java.lang.Object
org.yamcs.security.Directory
Stores user, group and application information in the Yamcs database.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddServiceAccount(ServiceAccount service) Creates a new service account.voidvoidchangePassword(User user, char[] password) voiddeleteGroup(Group group) voiddeleteServiceAccount(String name) voiddeleteUser(User user) getAccount(String name) getAccountForApplication(String applicationId) getRoles()getServiceAccount(String name) getUser(int id) getUsers()voidrenameGroup(String from, String to) voidvoidupdateGroupProperties(Group group) voidupdateUserProperties(User user) booleanvalidateApplicationPassword(String applicationId, char[] password) Validates the provided password against the stored password hash of an application.booleanvalidateUserPassword(String username, char[] password) Validates the provided password against the stored password hash of a user.
-
Constructor Details
-
Directory
- Throws:
InitException
-
-
Method Details
-
addUser
- Throws:
IOException
-
updateUserProperties
- Throws:
IOException
-
deleteUser
- Throws:
IOException
-
addGroup
- Throws:
IOException
-
renameGroup
- Throws:
IOException
-
updateGroupProperties
- Throws:
IOException
-
deleteGroup
- Throws:
IOException
-
addServiceAccount
Creates a new service account. The service account is assumed to represent one application only, for which automatically generated credentials are returned. These may be used to identify as that application, for example to generate access tokens.- Throws:
IOException
-
deleteServiceAccount
- Throws:
IOException
-
updateApplicationProperties
- Throws:
IOException
-
validateUserPassword
Validates the provided password against the stored password hash of a user.- Returns:
- true if the password is correct, false otherwise
-
validateApplicationPassword
Validates the provided password against the stored password hash of an application.Currently this is only functional for service accounts (which map to one and only one application), but some day we may also want to support user applications.
-
changePassword
- Throws:
IOException
-
getAccount
-
getUser
-
getUser
-
getUsers
-
getAccountForApplication
-
getGroup
-
getGroups
-
getGroups
-
getServiceAccount
-
getServiceAccounts
-
getRoles
-
getRole
-