Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...





Strategies for extracting authorization, identity, and resource metadata
Strategies and best practices for OAA connector development

- orgs/{org_name} - Get Organization information
- orgs/{org_name}/members - List members for an organization
- orgs/{org_name}/teams - List teams for an organization
- orgs/{org_name}/teams/{team}/members - List members for a given team
- orgs/{org_name}/repos - List organization repositories
- repos/{org_name}/{repo}/teams - List Team permissions for repository
- repos/{org_name}/{repo}/collaborators?affiliation=direct - List team members with direct permissionsself.app.add_local_role("Write", ["Pull", "Fork", "Push", "Merge"])self.app.add_custom_permission("limited_user", permissions=[OAAPermission.DataRead, OAAPermission.MetadataRead])
self.app.add_local_role("Responder", unique_id="limited_user", permissions=["limited_user"]){
"resource_type": "Cluster",
"description": "release staging cluster",
"sub_resources": [],
"tags": [
{
"key": "environment",
"value": "development"
}
]
}...
"local_groups": [
{
"name": "LGroup1",
"identities": [
"[email protected]"
],
"tags": [
{
"key": "NewTag2Key",
"value": "NewTag2Value"
}
],
"operation": "add_tag"
}
]
...id value becomes the key for referencing local users, groups and roles in the identity_to_permissions section of the payload and for referencing group memberships.Applying additional metadata to OAA entities
app = CustomApplication(name="Demo", application_type="Demo")
# Define a new local user string property `email`
app.property_definitions.define_local_user_property("email", OAAPropertyType.STRING)
local_user = app.add_local_user(name="name", unique_id="user_id")
# set the property by name
local_user.set_property("email", "[email protected]") "custom_property_definition": {
"applications": [
{
"application_type": "GitLab",
"application_properties": {},
"local_user_properties": {
"id": "NUMBER",
"bot": "BOOLEAN",
"is_licensed": "BOOLEAN",
"state": "STRING"
},
"local_group_properties": {},
"local_role_properties": {},
"role_assignment_properties": {
"assigned_at": "TIMESTAMP",
"expires_at": "TIMESTAMP"
},
"local_access_creds_properties": {
"scope": "STRING",
"rotation_period_days": "NUMBER"
},
"resources": [
{
"resource_type": "project",
"properties": {
"id": "NUMBER",
"visibility": "STRING"
}
}
]
}
]
}{
"name": "support-bot",
"identities": ["[email protected]"],
"groups": null,
"is_active": true,
"created_at": "2022-01-25T18:55:19.146Z",
"last_login_at": null,
"deactivated_at": null,
"password_last_changed_at": null,
"tags": [],
"custom_properties": {
"id": 7,
"is_licensed": false,
"state": "active",
"bot": true
}
}{
"custom_property_definition": {
"domain_properties": null,
"group_properties": {
"group_lead": "STRING"
},
"user_properties": {
"birthday": "TIMESTAMP",
"description": "STRING",
"last_login": "TIMESTAMP",
"is_licensed": "BOOLEAN",
"region": "STRING"
}
},
"name": "My IdP",
"id": "custom_idp",
"domains": [
{
"name": "domain.biz"
}
],
"users": [
{
"name": "Colby Smith",
"custom_properties": {
"is_licensed": false,
"region": "US-West"
}
}
]
} "resources": [
{
"name": "resource1",
"resource_type": "type1",
"tags": [
{
"key": "keyDelta1",
"value": "valDelta1"
}
],
"operation": "add_tag"
},
{
"name": "resource1",
"resource_type": "type1",
"operation": "modify"
}
]{
"incremental_change": true,
"applications": [
{
"name": "Controller1",
"application_type": "WebServer",
"description": "The base web server",
"local_users": [
{
"name": "LUser1",
"identities": [
"[email protected]"
],
"operation": "delete"
},
{
"name": "LUser1",
"identities": [
"[email protected]"
],
"operation": "add"
}
],
"local_groups": [
{
"name": "LGroup1",
"identities": [
"[email protected]"
],
"tags": [
{
"key": "groupTag2Key",
"value": "groupTag2Value"
}
],
"operation": "add_tag"
}
],
"local_roles": [
{
"name": "LRole2",
"permissions": [
"FULL"
],
"operation": "delete"
}
],
"resources": [
{
"name": "resource1",
"sub_resources": [
{
"name": "sub1b",
"operation": "delete"
}
],
"operation": "modify"
}
]
}
],
"permissions": [
{
"name": "Just Access",
"operation": "modify"
},
{
"name": "NonData",
"PermissionType": [
"NonData"
],
"operation": "add"
},
{
"name": "READ",
"permission_type": [
"DataRead"
],
"operation": "delete"
},
{
"name": "READ",
"permission_type": [
"DataRead"
],
"operation": "add"
}
],
"identity_to_permissions": [
{
"identity": "[email protected]",
"identity_type": "IDP",
"role_assignments": [
{
"application": "Controller1",
"role": "LRole1",
"apply_to_application": true,
"operation": "delete"
},
{
"application": "Controller1",
"role": "LRole2",
"resources": [
"resource1",
"resource1.sub1a.sub2b"
],
"operation": "add"
}
]
},
{
"identity": "[email protected]",
"identity_type": "IDP",
"role_assignments": [
{
"application": "Controller1",
"role": "LRole1",
"resources": [
"resource1.sub1b",
"resource1.sub1c"
],
"operation": "delete_resource"
},
{
"application": "Controller1",
"role": "LRole1",
"resources": [
"resource1.sub1a"
],
"operation": "add_resource"
}
],
"application_permissions": [
{
"application": "WebServer2",
"permission": "Just Access",
"operation": "delete"
}
]
}
]
}{
"external_id": "[email protected]",
"owner_type": "OktaUser",
"primary": true
} "local_roles": [
{
"name": "User Admin",
"permissions": [
"view_all",
"manage_users"
],
"owners": [
{
"external_id": "[email protected]",
"owner_type": "OktaUser",
"primary": true
}
]
}
]