Class SecurityToken

java.lang.Object
org.azd.security.SecurityToken

public class SecurityToken extends Object
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

  • Constructor Details

    • SecurityToken

      public SecurityToken()
  • Method Details

    • generate

      public static 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 hashmap
      Parameters:
      scope - pre-defined scope entry in enum set below
      keys - hashmap containing replacement values for token string.
      Returns:
      String token reference path
    • keys

      public static Set<String> keys(SecurityToken.Scope scope)
      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)