Skip to content

Commit c860ea7

Browse files
authored
Merge pull request #473 from permitio/filipermit/timeline
Timeline integration
2 parents 630f880 + 21f1a13 commit c860ea7

11 files changed

+185
-128
lines changed

docs/overview/configure-your-first-rbac-policy.mdx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,19 @@ import createUser from "/static/ui-videos/overview/creating-a-user.mp4";
1414
import checkPolicies from "/static/ui-videos/overview/check-policies.mp4";
1515

1616
import WhatsNext from "../../src/components/whats-next/WhatsNext";
17+
import TimelineStep from "../../src/components/timeline/TimelineStep";
18+
import TimelineWrapper from "../../src/components/timeline/TimelineWrapper";
19+
import Video from "../../src/components/video/Video";
1720

1821
> For example, in a web application, an "Admin" role might have full access to manage resources, while a "Viewer" role can
1922
> only view them.
2023
2124
In this guide, you'll learn how to configure your first RBAC policy, step by step—starting with creating roles, defining
2225
resources and actions, and assigning roles to users.
2326

27+
<TimelineWrapper>
28+
<TimelineStep>
29+
2430
## Creating your first role
2531

2632
The first step in configuring your RBAC policy is to define roles, which represent a set of permissions associated with
@@ -38,9 +44,11 @@ To **create the Admin** role:
3844
2. Click `Create a Role`
3945
3. Enter "Admin" as the name of the role.
4046

41-
<video controls autoPlay loop>
42-
<source src={createRole} />
43-
</video>
47+
<Video src={createRole} controls />
48+
49+
</TimelineStep>
50+
51+
<TimelineStep>
4452

4553
## Creating a resource and its actions
4654

@@ -58,9 +66,11 @@ This combination of predefined and bespoke actions gives you flexibility in craf
5866
your application’s needs.
5967
:::
6068

61-
<video controls autoPlay loop>
62-
<source src={createResource} />
63-
</video>
69+
<Video src={createResource} controls />
70+
71+
</TimelineStep>
72+
73+
<TimelineStep>
6474

6575
## Configuring RBAC permissions in the Policy editor
6676

@@ -77,9 +87,11 @@ This is done in the Policy Editor, where you can specify what actions each role
7787
By mapping specific actions to roles in the Policy Editor, you ensure your access control model is both secure and flexible, tailored
7888
to your application's requirements.
7989

80-
<video controls autoPlay loop>
81-
<source src={checkPolicies} />
82-
</video>
90+
<Video src={checkPolicies} controls />
91+
92+
</TimelineStep>
93+
94+
<TimelineStep>
8395

8496
## Add a user and assign a role
8597

@@ -97,16 +109,18 @@ what they can do.
97109
4. Assign the `Admin` role to this user by selecting it from the list of available roles. This grants the user full administrative
98110
permissions to manage resources and perform all actions defined for the role.
99111

100-
<video controls autoPlay loop>
101-
<source src={createUser} />
102-
</video>
112+
<Video src={createUser} controls />
103113

104114
<br />
105115
<br />
106116

107117
Once this step is complete, your RBAC setup is ready, and the Admin role will have all the necessary permissions to
108118
manage the Document resource effectively.
109119

120+
</TimelineStep>
121+
122+
</TimelineWrapper>
123+
110124
## What did you learn?
111125

112126
Congratulations! 🎉 You’ve successfully configured your first **RBAC** policy by creating a role, defining a resource with

docs/overview/perform-policy-check-with-cloud-pdp.mdx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ to perform specific actions on a resource. This ensures that your access control
1010

1111
import CodeBlock from "../../src/components/code-block/CodeBlock";
1212
import WhatsNext from "../../src/components/whats-next/WhatsNext";
13+
import TimelineStep from "../../src/components/timeline/TimelineStep";
14+
import TimelineWrapper from "../../src/components/timeline/TimelineWrapper";
15+
import Video from "../../src/components/video/Video";
1316

1417
import pullPDP from "/img/updated/walkthroughs/local-policy-check/pulling-pdp.mp4";
1518
import runPDP from "/img/updated/walkthroughs/local-policy-check/running-pdp.mp4";
@@ -35,6 +38,9 @@ parameters such as the `user ID`, `action`, and `resource`, the check function q
3538
The check function can accept various arguments beyond the user and resource.
3639
:::
3740

41+
<TimelineWrapper>
42+
<TimelineStep>
43+
3844
## Using the cloud PDP to run our first check
3945

4046
To perform our first policy check, we need to identify an enforcement point in our code—this is where the check function comes into
@@ -94,6 +100,9 @@ Cloud PDP is limited to RBAC policies only, with 1MB data restriction. For ABAC
94100
For production deployments, we recommend deploying a local PDP to minimize network latency and ensure high availability.
95101
:::
96102

103+
</TimelineStep>
104+
<TimelineStep>
105+
97106
## Running a local PDP
98107

99108
A Policy Decision Point (PDP) is the component responsible for making authorization decisions based on defined policies.
@@ -111,9 +120,7 @@ Permit.io provides the PDP as a ready-to-use Docker container. Start by pulling
111120
docker pull permitio/pdp-v2:latest
112121
```
113122

114-
<video controls autoPlay loop>
115-
<source src={pullPDP} />
116-
</video>
123+
<Video src={pullPDP} controls />
117124

118125
:::note
119126
If Docker is not yet installed on your system, [click here](https://docs.docker.com/get-started/get-docker/) to install Docker.
@@ -127,15 +134,16 @@ Once the container is pulled, you can run the PDP locally. Replace `<YOUR_API_KE
127134
docker run -it -p 7766:7000 --env PDP_DEBUG=True --env PDP_API_KEY=<YOUR_API_KEY> permitio/pdp-v2:latest
128135
```
129136

130-
<video controls autoPlay loop>
131-
<source src={runPDP} />
132-
</video>
137+
<Video src={runPDP} controls />
133138

134139
<br />
135140
<br />
136141

137142
> The container will expose the PDP on `localhost:7766`, ready to handle authorization requests.
138143
144+
</TimelineStep>
145+
<TimelineStep>
146+
139147
## Initialize the Permit object
140148

141149
After setting up the Local PDP, you can integrate it into your application to handle authorization checks. The process is almost
@@ -145,6 +153,9 @@ When initializing the Permit object in your application, point it to the locally
145153

146154
<CodeBlock folderPath="/walkthroughs/first-policy-check/local-pdp-obj" />
147155

156+
</TimelineStep>
157+
<TimelineStep>
158+
148159
## Perform the authorization check
149160

150161
Perform authorization checks as you normally would. The Local PDP will seamlessly handle policy validation. We will use the same
@@ -172,6 +183,9 @@ We have identified the enforcement point where we will check if Macy has the **p
172183
const permitted = permit.check("user|987654321", "create", "document");
173184
```
174185

186+
</TimelineStep>
187+
</TimelineWrapper>
188+
175189
## What did you learn?
176190

177191
By configuring the Cloud PDP for policy checks, you’ve learned how to:

docs/overview/setup-attribute-based-access-control.mdx

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ import userSet from "/img/updated/walkthroughs/abac-guide/user-set.mp4";
1414
import resourceSet from "/img/updated/walkthroughs/abac-guide/resource-set.mp4";
1515
import settingPolicy from "/img/updated/walkthroughs/abac-guide/setting-policy.mp4";
1616
import WhatsNext from "../../src/components/whats-next/WhatsNext";
17+
import TimelineStep from "../../src/components/timeline/TimelineStep";
18+
import TimelineWrapper from "../../src/components/timeline/TimelineWrapper";
19+
import Video from "../../src/components/video/Video";
1720

1821
## Understanding the scenario
1922

@@ -28,6 +31,9 @@ roles and uses ABAC to enforce fine-grained policies based on user and resource
2831
In this step-by-step guide, we’ll walk through creating and implementing an ABAC policy for this
2932
scenario, demonstrating the power and flexibility of attribute-based control.
3033

34+
<TimelineWrapper>
35+
<TimelineStep>
36+
3137
## Create User Attributes
3238

3339
User attributes form the foundation of ABAC policies. These attributes define who the user is and
@@ -46,9 +52,10 @@ details like department, role, or certification status during the authentication
4652
In order to set User attributes navigate to **`Directory` > `Settings` >
4753
`User Attributes` and then `Add Attribute`**.
4854

49-
<video controls autoPlay loop>
50-
<source src={addUserAttributes} />
51-
</video>
55+
<Video src={addUserAttributes} />
56+
57+
</TimelineStep>
58+
<TimelineStep>
5259

5360
## Create Resource Attributes
5461

@@ -68,9 +75,10 @@ Navigate to the Resources Panel, select Resource Attributes, and add these:
6875
In order to set Resource attributes navigate to **`Policy`** > **`Edit Resource`** (if one exists) > **`ABAC Options`** and then
6976
**`Attributes`**.
7077

71-
<video controls autoPlay loop>
72-
<source src={addResourceAttributes} />
73-
</video>
78+
<Video src={addResourceAttributes} />
79+
80+
</TimelineStep>
81+
<TimelineStep>
7482

7583
## Define a User Set
7684

@@ -83,9 +91,10 @@ Navigate to User Sets and configure the conditions:
8391
- `department` equals `Engineering`.
8492
- `training_status` equals `certified`.
8593

86-
<video controls autoPlay loop>
87-
<source src={userSet} />
88-
</video>
94+
<Video src={userSet} />
95+
96+
</TimelineStep>
97+
<TimelineStep>
8998

9099
## Define a Resource Set
91100

@@ -98,9 +107,10 @@ Navigate to Resource Sets and configure the conditions:
98107
- `priority_level` equals `high`.
99108
- `document_type` equals `classified`.
100109

101-
<video controls autoPlay loop>
102-
<source src={resourceSet} />
103-
</video>
110+
<Video src={resourceSet} />
111+
112+
</TimelineStep>
113+
<TimelineStep>
104114

105115
## Create your policy rules
106116

@@ -110,9 +120,10 @@ Policy rules link user sets, resource sets, and actions to enforce access contro
110120
> classified documents. In contrast, an **R&D Certified Employee** is allowed to `read` both standard `documents` and `High Priority
111121
Classified Documents`.
112122

113-
<video controls autoPlay loop>
114-
<source src={settingPolicy} />
115-
</video>
123+
<Video src={settingPolicy} />
124+
125+
</TimelineStep>
126+
</TimelineWrapper>
116127

117128
## What did you learn?
118129

docs/overview/sync-your-first-user-with-sdk.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ between your application's user management system and our policy engine.
88

99
import CodeBlock from "../../src/components/code-block/CodeBlock";
1010
import WhatsNext from "../../src/components/whats-next/WhatsNext";
11+
import TimelineStep from "../../src/components/timeline/TimelineStep";
12+
import TimelineWrapper from "../../src/components/timeline/TimelineWrapper";
1113

1214
:::tip
1315
Permit is fully API-driven, providing a seamless way to programmatically manage everything you can do via our
@@ -35,6 +37,9 @@ If you would like to do some further reading on understanding the Permit Hierarc
3537
[here](/manage-your-account/projects-and-env#managing-access-to-a-project).
3638
:::
3739

40+
<TimelineWrapper>
41+
<TimelineStep>
42+
3843
## Sync Users from your identity provider
3944

4045
To create a user in Permit, you need to make a POST request to the users endpoint using your project ID (`proj_id`),
@@ -49,6 +54,9 @@ identity providers like [Entra ID](/integrations/SCIM/EntraID), [Okta](/integrat
4954
and de-provisioning users in Permit.
5055
:::
5156

57+
</TimelineStep>
58+
<TimelineStep>
59+
5260
## Verify the user was created in the Permit Directory
5361

5462
> In this case, we will use `cURL` to run this request
@@ -90,13 +98,19 @@ right tenant.
9098
data-zoomable
9199
/>
92100

101+
</TimelineStep>
102+
<TimelineStep>
103+
93104
## Assign a role to the User (optional)
94105

95106
Once the user is created, you can choose to make another API request to `assign a role to the user`. This is done by calling the
96107
following endpoint.
97108

98109
<CodeBlock folderPath="/walkthroughs/sync-first-user/assign-role" />
99110

111+
</TimelineStep>
112+
<TimelineStep>
113+
100114
## Create a new tenant
101115

102116
In Permit, a tenant represents an isolated space within your application where roles, resources, and permissions are separated.
@@ -115,6 +129,9 @@ Manager in another), ensuring their permissions are context-specific.
115129
data-zoomable
116130
/>
117131

132+
</TimelineStep>
133+
<TimelineStep>
134+
118135
## Add a user to a new tenant and assign them a different role
119136

120137
It is now time to guide you through `adding a user` to a `new tenant` and `assigning them a specific role`, ensuring their permissions
@@ -141,6 +158,9 @@ are customized for that tenant.
141158
data-zoomable
142159
/>
143160

161+
</TimelineStep>
162+
</TimelineWrapper>
163+
144164
## What did you learn?
145165

146166
In this guide, you’ve learned how to:

0 commit comments

Comments
 (0)