Skip to content

Commit

Permalink
docs: locking down on roles
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKs committed Jul 13, 2024
1 parent 1aa45f3 commit 2cfc5c5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/docs/usage-and-faq/locking_down_on_roles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@ title: Locking down on roles
sidebar_position: 3
---

## Azure setup
Go to your application registration, click `Groups`:
![manifest](../../static/img/usage-and-faq/role_1.png)

Create a role:
![manifest](../../static/img/usage-and-faq/role_2.png)

Go to Overview and click the Enterprise application link:
![manifest](../../static/img/usage-and-faq/role_3.png)

Go to `Users and groups` and add a user/group:
![manifest](../../static/img/usage-and-faq/role_4.png)

Add the user/group that you want to have this role (if you use a group, the users must be a direct member of that group. Nested membership does not work):
![manifest](../../static/img/usage-and-faq/role_5.png)

Click `select role` and assign the user/role to your application role:
![manifest](../../static/img/usage-and-faq/role_6.png)

Finish by clicking `Assign`. The user will now have that group in their token.

## App code

You can lock down on roles by creating your own wrapper dependency:

```python title="dependencies.py"
Expand Down
Binary file added docs/static/img/usage-and-faq/role_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/img/usage-and-faq/role_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/img/usage-and-faq/role_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/img/usage-and-faq/role_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/img/usage-and-faq/role_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/img/usage-and-faq/role_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2cfc5c5

Please sign in to comment.