Skip to content
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

Add docs for role.spec.allow.reason.mode #49363

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kopiczko
Copy link
Contributor

No description provided.

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-49363.d3pp5qlev8mo18.amplifyapp.com

Copy link
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but hold this off until after implementation is merged

Comment on lines 328 to 332
resource allowed by "root-node-access" they will be required to provide a reason. This is true even
if they are assigned to another role which allows requesting those roles/resources and doesn't have
the reason mode set to "required". Or in other words, if there are multiple roles allowing
requesting the same roles/search_as_roles with request mode set, "require" has a higher priority
than "optional".
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: A little shorter and still carries the point across.

Suggested change
resource allowed by "root-node-access" they will be required to provide a reason. This is true even
if they are assigned to another role which allows requesting those roles/resources and doesn't have
the reason mode set to "required". Or in other words, if there are multiple roles allowing
requesting the same roles/search_as_roles with request mode set, "require" has a higher priority
than "optional".
resource allowed by "root-node-access" they will be required to provide a reason. If
a user's roleset includes multiple roles governing access requests to the same roles
and resources, "require" mode takes precedence.


```yaml
kind: role
version: v6
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version: v6
version: v7

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I change it in all examples in on this page?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah role v7 is the latest, we should prefer using it.

|Value|Meaning|
|---|---|
| `optional` | The default. The user does not need to provide a reason when making a request. |
| `required` | The user must provide a reason when making a request. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `required` | The user must provide a reason when making a request. |
| `required` | The user must provide a non-empty reason when making a request. |

Copy link

🤖 Vercel preview here: https://docs-dtgn2ddrw-goteleport.vercel.app/docs

Comment on lines +297 to +300
## Reason mode

Reason mode allows enforcing users to provide reason while making an Access Request. It only works
in allow rules and is set with `allow.request.reason.mode`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "Reason mode" feels weird written out in english, maybe this is better

Suggested change
## Reason mode
Reason mode allows enforcing users to provide reason while making an Access Request. It only works
in allow rules and is set with `allow.request.reason.mode`.
## Requiring request reasons
The `allow.request.reason.mode` field controls whether a reason is required when users submit access requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion here. @r0mant ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nic's suggestion looks good to me.

@kopiczko kopiczko force-pushed the kopiczko/add-docs-for-role.spec.allow.reason.mode branch from cab0166 to 60382dd Compare November 22, 2024 20:36
Copy link

🤖 Vercel preview here: https://docs-6ts77i7ro-goteleport.vercel.app/docs

@kopiczko kopiczko force-pushed the kopiczko/add-docs-for-role.spec.allow.reason.mode branch from 60382dd to d7fa1c2 Compare November 22, 2024 20:48

If a user with "node-requester" role assigned makes an Access Request for "node-access" role or any
resource allowed by "root-node-access" they will be required to provide a reason. If a user's
roleset includes multiple roles governing access requests to the same roles and resources,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
roleset includes multiple roles governing access requests to the same roles and resources,
roleset includes multiple roles governing Access Requests to the same roles and resources,

We're capitalizing "Access Requests" across the docs. Not sure why it's not capitalized here but it is earlier in the paragraph.

Copy link

🤖 Vercel preview here: https://docs-mwizanfer-goteleport.vercel.app/docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants