{ "$schema": "http://json-schema.org/draft-07/schema", "$id": "accounts-schema", "type": "object", "title": "Itential Account Schema", "description": "This is the schema for an IAP account stored in Mongo", "properties": { "provenance": { "title": "Provenance", "description": "AAA provider where account originated", "type": "string", "examples": [ "Local AAA" ] }, "username": { "$ref": "#/definitions/username" }, "firstname": { "title": "First Name", "description": "The user's first name", "type": "string", "examples": [ "John" ] }, "memberOf": { "$ref": "#/definitions/memberOf" }, "assignedRoles": { "$ref": "#/definitions/assignedRoles" }, "inactive": { "$ref": "#/definitions/inactive" }, "lastLogin": { "title": "Last Login", "description": "Date and time when the user last logged in", "type": "string", "examples": [ "2018-08-02T15:56:12.912Z" ] }, "sso": { "title": "sso", "description": "Whether this is an SSO user", "type": "boolean" }, "nameID": { "title": "nameID", "description": "Identifier for SSO account.", "type": "string" }, "_meta": { "type": "object", "properties": { "created": { "title": "Created", "description": "When the account was created", "type": "string", "examples": [ "2018-08-02T15:56:12.912Z" ] }, "updated": { "title": "Updated", "description": "When the account was last updated", "type": "string", "examples": [ "2018-08-02T15:56:12.912Z" ] } } }, "email": { "$ref": "#/definitions/email" }, "isServiceAccount": { "$ref": "#/definitions/isServiceAccount" }, "loggedIn": { "$ref": "#/definitions/loggedIn" }, "gitTokens": { "$ref": "#/definitions/gitTokens" } }, "additionalProperties": false, "required": [ "provenance", "username", "firstname", "memberOf", "assignedRoles", "inactive", "gitTokens" ], "definitions": { "username": { "title": "Username", "description": "Username for account", "type": "string", "examples": [ "john_doe" ] }, "inactive": { "title": "Inactive", "description": "Setting for whether account is active or not", "type": "boolean" }, "memberOf": { "title": "Assigned Groups", "description": "Groups which this account is a part of", "type": "array", "items": { "type": "object", "properties": { "aaaManaged": { "description": "Whether group comes from an external AAA or not", "type": "boolean" }, "groupId": { "$ref": "common-schema#/definitions/objectId" } } } }, "assignedRoles": { "title": "Assigned Roles", "description": "Roles assigned to this account", "type": "array", "items": { "type": "object", "properties": { "roleId": { "title": "Role ID", "$ref": "common-schema#/definitions/objectId" } }, "additionalProperties": false } }, "email": { "title": "Email", "description": "Email for user", "type": "string", "examples": [ "name@email.com" ] }, "isServiceAccount": { "description": "Value denoting if an account does not reflect a human user", "type": "boolean" }, "loggedIn": { "description": "Property used in the getAccounts API to indicate a user is currently logged in", "type": "boolean" }, "gitTokens": { "description": "Tokens used when interacting with Git APIs and features", "type": "object", "properties": { "GitHub": { "description": "Personal access token for GitHub", "type": "string" }, "GitLab": { "description": "Personal access token for GitLab", "type": "string" } }, "additionalProperties": false } } }