Documentation
¶
Index ¶
- func AuthzListToMap(paths []string) map[string][]string
- func AuthzMapFromScope(org, project string) map[string][]string
- func AuthzMapToControlledAccess(authzMap map[string][]string) []string
- func AuthzMapToList(authzMap map[string][]string) []string
- func ControlledAccessToAuthzMap(claims []string) map[string][]string
- func NormalizeAccessResource(raw string) string
- func NormalizeAccessResources(resources []string) []string
- func NormalizeChecksum(raw string) string
- func NormalizeOid(oid string) string
- func ResourcePath(org, project string) (string, error)
- func ResourceScope(resource string) (string, string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthzListToMap ¶
AuthzListToMap converts a list of resource-path strings (for example "/organization/org/project/proj" or legacy "/programs/org/projects/proj") to the wire-format org→projects map.
func AuthzMapFromScope ¶
AuthzMapFromScope builds the wire-format authorizations map from an org and project. Empty project means org-wide access (value is empty slice).
func AuthzMapToControlledAccess ¶ added in v0.2.8
func AuthzMapToList ¶
AuthzMapToList converts the wire-format org→projects map back to a list of canonical resource-path strings for internal storage.
func ControlledAccessToAuthzMap ¶ added in v0.2.8
func NormalizeAccessResource ¶ added in v0.2.8
NormalizeAccessResource converts GA4GH controlled_access URL claims and accepted resource path aliases into the canonical resource form used for privilege checks: /organization/<organization>[/project/<project>].
func NormalizeAccessResources ¶ added in v0.2.8
func NormalizeChecksum ¶
NormalizeChecksum trims whitespace and an optional sha256: prefix.
func NormalizeOid ¶
NormalizeOid strips an optional "sha256:" prefix, lowercases, and validates that the result is a 64-character hex string. Returns "" for invalid input.
func ResourcePath ¶
ResourcePath returns the canonical resource path for an org/project scope, e.g. "/organization/myorg/project/myproject".
func ResourceScope ¶ added in v0.2.8
ResourceScope parses a canonical or raw access resource into (organization, project). It accepts "/organization/org", "/organization/org/project/proj", and legacy "/programs/org/projects/proj" alias forms.
Types ¶
This section is empty.