Can a secret be hidden in a 'safe' java class offering access credentials?

后端 未结 12 1729
北荒
北荒 2020-12-03 09:04

This is a brainstorming question about what\'s possible in Java (or not). I want to know if it is possible to hide a secret within a class and prevent anymore from accessing

12条回答
  •  Happy的楠姐
    2020-12-03 09:19

    There is another angle to this issue: Java delivered Permissions. In a context where the environment is controlled, one can assign a set of permissions to classes loaded with a secure class loader.

    Java delivers 3 permissions objects related to the implementation of security:

    PrivateCredentialPermission SecurityPermission AuthPermission

    These can help improve and control access to functionalities when implementing a cryptography system. They are necessarily sufficient to make the system secure.

提交回复
热议问题