Skip to content

Commit

Permalink
docs: RBAC, identity mapper schema, identity schema
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Oct 2, 2024
1 parent 45620e7 commit 178c7e2
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 55 deletions.
2 changes: 2 additions & 0 deletions mission-control/docs/installation/_properties.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import MissionControl from './_properties_mission_control.mdx'
import Db from './_properties_db.mdx'
import Agent from './_agent_properties.mdx'
import Ingress from './_properties_ingress.mdx'
import IdentityMapper from './_properties_identity_mapper.mdx'

{(!props.section || props.section == "mission-control") && <MissionControl/>}
{( props.section == "agent") && <Agent/>}
{(!props.section || props.section == "ingress") && <Ingress/>}
{(!props.section || props.section == "db") && <Db/>}
{(!props.section || props.section == "auth") && <Auth/>}
{(!props.section || props.section == "agent" || props.section == "security") && <Security/>}
{(!props.section && props.section != "agent") && <IdentityMapper/>}
54 changes: 54 additions & 0 deletions mission-control/docs/installation/_properties_identity_mapper.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
### Identity Mapper

The schema for the object to be returned by the identity mapper script.

<Fields rows={
[{
field: "role",
description: "Mission control role",
scheme: "string",
},
{
field: "teams",
description: "Teams the OIDC identity will be put into",

Check warning on line 13 in mission-control/docs/installation/_properties_identity_mapper.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/installation/_properties_identity_mapper.mdx#L13

[Flanksource.FutureTense] Use present tense verbs, not future tense verbs like 'will'. Say '(event) happens' instead of '(event) will happen'.
Raw output
{"message": "[Flanksource.FutureTense] Use present tense verbs, not future tense verbs like 'will'. Say '(event) happens' instead of '(event) will happen'.", "location": {"path": "mission-control/docs/installation/_properties_identity_mapper.mdx", "range": {"start": {"line": 13, "column": 43}}}, "severity": "WARNING"}
scheme: "`[]string`",
}]
} />


#### Kratos Identity

<Fields rows={
[
{
field: "created_at",

Check failure on line 24 in mission-control/docs/installation/_properties_identity_mapper.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/installation/_properties_identity_mapper.mdx#L24

[Flanksource.Spelling] Is 'created_at' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'created_at' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/installation/_properties_identity_mapper.mdx", "range": {"start": {"line": 24, "column": 15}}}, "severity": "ERROR"}
description: "Timestamp for when the identity was created",
scheme: "timestamp",
},
{
field: "id",
description: "Unique identifier for the identity",
scheme: "string",
},
{
field: "metadata_public",

Check failure on line 34 in mission-control/docs/installation/_properties_identity_mapper.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/installation/_properties_identity_mapper.mdx#L34

[Flanksource.Spelling] Is 'metadata_public' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'metadata_public' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/installation/_properties_identity_mapper.mdx", "range": {"start": {"line": 34, "column": 15}}}, "severity": "ERROR"}
description: "Public metadata for the identity",
scheme: "`map[string]any`",
},
{
field: "state",
description: "Current state of the identity",
scheme: "`active` | `inactive`",
},
{
field: "traits",
description: "Identity's traits. Depends on the kratos configuration. See [default](https://github.com/flanksource/mission-control-chart/blob/main/chart/files/kratos-identity-schema.json).",

Check failure on line 45 in mission-control/docs/installation/_properties_identity_mapper.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/installation/_properties_identity_mapper.mdx#L45

[Flanksource.Spelling] Is 'kratos' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'kratos' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/installation/_properties_identity_mapper.mdx", "range": {"start": {"line": 45, "column": 55}}}, "severity": "ERROR"}
scheme: "`any`",
},
{
field: "updated_at",

Check failure on line 49 in mission-control/docs/installation/_properties_identity_mapper.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/installation/_properties_identity_mapper.mdx#L49

[Flanksource.Spelling] Is 'updated_at' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'updated_at' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/installation/_properties_identity_mapper.mdx", "range": {"start": {"line": 49, "column": 15}}}, "severity": "ERROR"}
description: "Timestamp for when the identity was last updated",
scheme: "timestamp",
},
]
} />
4 changes: 2 additions & 2 deletions mission-control/docs/installation/self-hosted/oidc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ See [Providers](https://www.ory.sh/docs/kratos/social-signin/overview) more deta
<p/>

5. Optionally, create a cel expression to map identities from the OIDC provider to a mission control role & team.
_Example_: the following script maps all Azure users in the "SRE" group to the "admin" role & everyone else to a "viewer" role.
The following script maps all Azure users in the `SRE` group to the `admin` role and everyone else to the `viewer` role.

```yaml
apiVersion: v1
Expand All @@ -87,7 +87,7 @@ See [Providers](https://www.ory.sh/docs/kratos/social-signin/overview) more deta
```
<p/>

The cel expression is expected to return an object with a `role` & a `teams[]` fields.
See [Identity Mapper Schema](/reference/helm/mission-control#identity-mapper) & [RBAC](/reference/rbac)

6. Supply the identity mapper script to mission control.

Expand Down
96 changes: 48 additions & 48 deletions mission-control/docs/reference/helm/mission-control.mdx
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
---
title: Mission Control
---
import Properties from '@site/docs/installation/_properties.mdx'


import Properties from '@site/docs/installation/_properties.mdx'

export const toc = [

Check failure on line 7 in mission-control/docs/reference/helm/mission-control.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/helm/mission-control.mdx#L7

[Flanksource.Spelling] Is 'const' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'const' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/helm/mission-control.mdx", "range": {"start": {"line": 7, "column": 8}}}, "severity": "ERROR"}

Check failure on line 7 in mission-control/docs/reference/helm/mission-control.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/helm/mission-control.mdx#L7

[Flanksource.Spelling] Is 'toc' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'toc' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/helm/mission-control.mdx", "range": {"start": {"line": 7, "column": 14}}}, "severity": "ERROR"}
{
value: "Mission Control",
id: "mission-control",
level: 2,
},
{
value: "Canary Checker",
id: "canary-checker",
level: 3,
},
{
value: "Config DB",
id: "config-db",
level: 3,
},
{
value: "Authentication",
id: "authentication",
level: 2,
},

{
value: "Ingress",
id: "ingress",
level:2,
},
{
value: "Database",
id: "database",
level: 2,
},
{
value: "Custom postgres.conf",
id: "updating-postgresconf-settings",
level: 3,
},
{
value: "Using an External DB",
id: "using-an-external-database",
level: 3,
},





{
value: 'Mission Control',
id: 'mission-control',
level: 2,
},
{
value: 'Canary Checker',
id: 'canary-checker',
level: 3,
},
{
value: 'Config DB',
id: 'config-db',
level: 3,
},
{
value: 'Authentication',
id: 'authentication',
level: 2,
},

{
value: 'Ingress',
id: 'ingress',
level: 2,
},
{
value: 'Database',
id: 'database',
level: 2,
},
{
value: 'Custom postgres.conf',
id: 'updating-postgresconf-settings',
level: 3,
},
{
value: 'Using an External DB',
id: 'using-an-external-database',
level: 3,
},
{
value: 'Identity Mapper',
id: 'identity-mapper',
level: 2,
},
]


## Mission Control

<Properties/>
6 changes: 1 addition & 5 deletions mission-control/docs/reference/index.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---
title: Reference
slug: /reference
sidebar_position: 0
---

{/*
import DocCardList from '@theme/DocCardList';
<DocCardList /> */}
18 changes: 18 additions & 0 deletions mission-control/docs/reference/rbac.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: RBAC
sidebar_position: 10
---

Mission control heavily uses RBAC to manage access control and permissions within the system. In our system, we have defined the following roles:

Check warning on line 6 in mission-control/docs/reference/rbac.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/rbac.mdx#L6

[Flanksource.Adverbs] Consider removing 'heavily'.
Raw output
{"message": "[Flanksource.Adverbs] Consider removing 'heavily'.", "location": {"path": "mission-control/docs/reference/rbac.mdx", "range": {"start": {"line": 6, "column": 17}}}, "severity": "WARNING"}

## Admin

The admin role has full access to all features and functionalities of the system.

## Editor

The editor role has various read-write privileges apart from few highly privileged actions like user management, agent management, connection management, etc ...

## Viewer

The viewer role has read-only access to the system

0 comments on commit 178c7e2

Please sign in to comment.