-
Notifications
You must be signed in to change notification settings - Fork 96
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 invalidating registration tokens #3595
base: master
Are you sure you want to change the base?
Changes from 1 commit
97ccbee
ce2469f
5ec1c0e
67f3ac4
a6c1be8
9265c88
185ff49
b339ba8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[id="invalidating-registration-tokens"] | ||
= Invalidating registration tokens | ||
|
||
When you generate a registration command in global host registration, {Project} also generates a unique JSON Web Token (JWT) that is used to authorize the registration call from a host to {ProjectServer}. | ||
This JWT is bound to the user that generated the registration command. | ||
|
||
Users can configure a custom validity duration for the JWT. | ||
If the validity duration is too long or if the JWT has been compromised, the JWT poses a security concern. | ||
To mitigate this concern, the {Project} administrator or users with adequate permissions can invalidate existing JWTs. |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,36 @@ | ||||||||||
[id="invalidating-jwts-of-all-users"] | ||||||||||
= Invalidating JWTs of all users | ||||||||||
|
||||||||||
You can invalidate all registration JSON Web Tokens of all users at once. | ||||||||||
|
||||||||||
To use the CLI instead of the {ProjectWebUI}, see the xref:cli-invalidating-jwts-of-all-usersvvv[]. | ||||||||||
To use the API, see the xref:api-invalidating-jwts-of-all-users[]. | ||||||||||
|
||||||||||
.Prerequisites | ||||||||||
* Your {Project} user has a role that grants the `view_users` and `edit_users` permissions. | ||||||||||
|
||||||||||
.Procedure | ||||||||||
. In the {ProjectWebUI}, navigate to *Administer* > *Users*. | ||||||||||
. Click *Invalidate JWTs for all users*. | ||||||||||
. In the popup window, click *Confirm*. | ||||||||||
Check failure on line 15 in guides/common/modules/proc_invalidating-jwts-of-all-users.adoc GitHub Actions / linter
|
||||||||||
|
||||||||||
.Verification | ||||||||||
* The {ProjectWebUI} displays the following message: `Successfully invalidated registration tokens for all users.` | ||||||||||
|
||||||||||
[id="cli-invalidating-jwts-of-all-users"] | ||||||||||
.CLI procedure | ||||||||||
* Invalidate all registration tokens of all users by running Hammer: | ||||||||||
+ | ||||||||||
[options="nowrap" subs="+quotes,attributes,verbatim"] | ||||||||||
---- | ||||||||||
$ hammer | ||||||||||
---- | ||||||||||
|
||||||||||
[id="api-invalidating-jwts-of-all-users"] | ||||||||||
.API procedure | ||||||||||
* Invalidate all registration tokens of all users by calling the following API endpoint: | ||||||||||
+ | ||||||||||
[options="nowrap" subs="+quotes,attributes,verbatim"] | ||||||||||
---- | ||||||||||
$ curl | ||||||||||
---- | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an Ansible module too?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think there will be. @girijaasoni Can you please confirm? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[id="invalidating-jwts-of-other-users"] | ||
= Invalidating JWTs of other users | ||
|
||
You can invalidate all registration JSON Web Tokens of one or more users. | ||
Lennonka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
To use the CLI instead of the {ProjectWebUI}, see the xref:cli-invalidating-jwts-of-other-users[]. | ||
To use the API, see the xref:api-invalidating-jwts-of-other-users[]. | ||
|
||
.Prerequisites | ||
* Your {Project} user has a role that grants the `view_users` and `edit_users` permissions. | ||
|
||
.Procedure | ||
. In the {ProjectWebUI}, navigate to *Administer* > *Users*. | ||
. In the row of the user whose registration tokens you want to invalidate, from the actions menu, select *Invalidate JWTs*. | ||
. In the popup window, click *Confirm*. | ||
Check failure on line 15 in guides/common/modules/proc_invalidating-jwts-of-other-users.adoc GitHub Actions / linter
|
||
|
||
.Verification | ||
* The {ProjectWebUI} displays the following message: `Successfully invalidated registration tokens for _the user_.` | ||
|
||
[id="cli-invalidating-jwts-of-other-users"] | ||
.CLI procedure | ||
* Invalidate all registration tokens of multiple users by running Hammer: | ||
+ | ||
[options="nowrap" subs="+quotes,attributes,verbatim"] | ||
---- | ||
$ hammer | ||
---- | ||
|
||
[id="api-invalidating-jwts-of-other-users"] | ||
.API procedure | ||
* Invalidate all registration tokens of multiple users by calling the following API endpoint: | ||
+ | ||
[options="nowrap" subs="+quotes,attributes,verbatim"] | ||
---- | ||
$ curl | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[id="invalidating-your-own-jwts"] | ||
= Invalidating your own JWTs | ||
|
||
You can invalidate all registration JSON Web Tokens of the current user. | ||
|
||
To use the CLI instead of the {ProjectWebUI}, see the xref:cli-invalidating-your-own-jwts[]. | ||
To use the API, see the xref:api-invalidating-your-own-jwts[]. | ||
|
||
.Prerequisites | ||
* You are logged in to the {ProjectWebUI}. | ||
|
||
.Procedure | ||
. In the {ProjectWebUI}, click the user menu in the top bar and select *My Account*. | ||
. Select the *Registration Tokens* tab. | ||
. Click *Invalidate JWTs*. | ||
. In the popup window, click *Confirm*. | ||
Check failure on line 16 in guides/common/modules/proc_invalidating-your-own-jwts.adoc GitHub Actions / linter
|
||
|
||
.Verification | ||
* The {ProjectWebUI} displays the following message: `Successfully invalidated registration tokens.` | ||
|
||
[id="cli-invalidating-your-own-jwts"] | ||
.CLI procedure | ||
* Invalidate all your registration tokens by running Hammer: | ||
+ | ||
[options="nowrap" subs="+quotes,attributes,verbatim"] | ||
---- | ||
$ hammer | ||
---- | ||
|
||
[id="api-invalidating-your-own-jwts"] | ||
.API procedure | ||
* Invalidate all your registration tokens by calling the following API endpoint: | ||
+ | ||
[options="nowrap" subs="+quotes,attributes,verbatim"] | ||
---- | ||
$ curl | ||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need view_users permissions for api or cli
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That depends on how we write the procedure. In some cases it can be beneficial to list users to find their IDs before they run the main command. In such case, they would need the view_users permission, wouldn't they?
I'll revisit this once I have the commands ready.