-
Notifications
You must be signed in to change notification settings - Fork 437
NOP - Improve RBAC practices #1794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
khadni
wants to merge
7
commits into
main
Choose a base branch
from
improve-rbac-practices
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9e583c3
Update NOP - RBAC
khadni 40e2906
Update NOP - RBAC
khadni 326da7e
Merge branch 'main' into improve-rbac-practices
khadni 79eb29a
Update NOP - RBAC
khadni 8ad86e1
Update src/content/chainlink-nodes/v1/fulfilling-requests.mdx
khadni 82d6c35
Merge branch 'main' into improve-rbac-practices
khadni a78a785
Merge branch 'main' into improve-rbac-practices
dwightjl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,27 +4,15 @@ date: Last Modified | |
title: "Role-Based Access Control (RBAC)" | ||
--- | ||
|
||
Chainlink Nodes allow the root admin CLI user and any additional admin users to create and assign tiers of role-based access to new users. These new API users can able to log in to the Operator UI independently. | ||
import { Aside } from "@components" | ||
|
||
Each user has a specific role assigned to their account. There are four roles: `admin`, `edit`, `run`, and `view`. | ||
Chainlink Nodes allow the root admin CLI user and additional admin users to assign role-based access tiers. This approach grants specific access to multiple users without providing admin privileges to all users. | ||
|
||
If there are multiple users who need specific access to manage the Chainlink Node instance, permissions and level of access can be set here. | ||
These new API users can log in to the Operator UI independently. | ||
|
||
User management is configured through the use of the admin `chainlink admin users` command. Run `chainlink admin login` before you set user roles for other accounts. For example, a view-only user can be created with the following command: | ||
## Roles and access | ||
|
||
```shell | ||
chainlink admin users create [email protected] --role=view | ||
``` | ||
|
||
To modify permissions or delete existing users, run the `admin users chrole` or `admin users delete` commands. Use the `-h` flag to get a full list of options for these commands: | ||
|
||
```shell | ||
chainlink admin users chrole -h | ||
``` | ||
|
||
```shell | ||
chainlink admin users delete -h | ||
``` | ||
Each user has a specific role assigned to their account. There are four roles: `admin`, `edit`, `run`, and `view`. | ||
|
||
Specific actions are enabled to check role-based access before they execute. The following table lists the actions that have role-based access and the role that is required to run that action: | ||
|
||
|
@@ -84,4 +72,69 @@ Specific actions are enabled to check role-based access before they execute. The | |
| Edit user | | | | X | | ||
| List users | | | | X | | ||
|
||
The run command allows for minimal interaction and only enables the ability to replay a specific block number and kick off a job run. | ||
## Configure users and roles | ||
|
||
You can only use the CLI to configure role-based access. | ||
|
||
### Prerequisites | ||
|
||
Only admins can configure role-based access. Connect to the Chainlink node container and log in as an admin before you create, modify, or delete user roles for other accounts: | ||
|
||
1. Open an interactive shell session on the container that is running your node: | ||
|
||
```shell | ||
docker exec -it chainlink /bin/bash | ||
``` | ||
|
||
1. Log into the Chainlink CLI: | ||
|
||
```shell | ||
chainlink admin login | ||
``` | ||
|
||
The CLI prompts you for the admin credentials that you configured for your node. | ||
|
||
<Aside type="note" title="Log out of the CLI after your changes"> | ||
Log out of the CLI after your changes. This prevents users with access to the shell from executing admin commands. | ||
|
||
To log out from the shell session, run: | ||
|
||
```shell | ||
chainlink admin logout | ||
``` | ||
|
||
</Aside> | ||
|
||
### View the current list of users | ||
|
||
To view the current list of users, run the following command: | ||
|
||
```shell | ||
chainlink admin users list | ||
``` | ||
|
||
### Create a new user with a specific role | ||
|
||
For example, you can create a user with view-only permissions on the node with the following command: | ||
|
||
```shell | ||
chainlink admin users create [email protected] --role=view | ||
``` | ||
|
||
This user can now log into the UI and query the API, but cannot change any settings or jobs. | ||
|
||
### Modify a user role and permissions | ||
|
||
To modify permissions, run the `admin users chrole` command. Use the `-h` flag to get a complete list of options for these commands: | ||
|
||
```shell | ||
chainlink admin users chrole -h | ||
``` | ||
|
||
### Delete a user role and permissions | ||
|
||
To delete existing users, run the `admin users delete` command. Use the `-h` flag to get a complete list of options for these commands: | ||
|
||
```shell | ||
chainlink admin users delete -h | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.