Package org.azd.security
Class SecurityToken
java.lang.Object
org.azd.security.SecurityToken
refer to Security Token Reference Documentation
In order to reference and assign access control entries, scope must be specified via a token, which varies depending on the security namespace and resource. For instance, git repositories security scope range from:
- repoV2/[project_id]/[repo_id] - applies to a specific repository in a specific project
- repoV2/[project_id] - applies to all repositories in a specific project
- repoV2 - applies to all repositories
Not guaranteed to generate an acceptable token across all resources, as it does not appear to be implemented in an entirely consistent fashion
TODO: incomplete list. Scope items added as needed
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
generate
(SecurityToken.Scope scope, Map<String, String> keys) Based on the scope parameter, map replacement tokens in the token format string to values in the provided hashmapkeys
(SecurityToken.Scope scope) Extract set of keys required to populate token string fully
-
Constructor Details
-
SecurityToken
public SecurityToken()
-
-
Method Details
-
generate
Based on the scope parameter, map replacement tokens in the token format string to values in the provided hashmap- Parameters:
scope
- pre-defined scope entry in enum set belowkeys
- hashmap containing replacement values for token string.- Returns:
- String token reference path
-
keys
Extract set of keys required to populate token string fully- Parameters:
scope
- security scope entry in enum set- Returns:
- collection of unique strings (property key names)
-