-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Fleet] Rename force
param to revoke
for agent unenroll APIs
#96873
Labels
Comments
Pinging @elastic/fleet (Team:Fleet) |
Pinging @mdelapenya since this would affect e2e tests. I'm happy to submit a PR. I found https://github.com/elastic/e2e-testing/blob/150652154d11f916976c969a0935917a741f207a/e2e/_suites/fleet/fleet.go and will look for any other instances |
1 task
jfsiii
pushed a commit
that referenced
this issue
Apr 14, 2021
## Summary - fcbc9d9 Rename `force` param to `revoke` for `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll` - 03b9b90 Add new `force` param See #96873 for background <table> <thead> <tr> <td rowspan="2"></td><td colspan="2">Unenroll Agent</td><td rowspan="2">Revoke API Keys</td> </tr> <tr> <td>Regular</td><td>Hosted</td></td> </tr> </thead> <tr><td colspan="4"><strong>Rename <code>force</code> to <code>revoke</code></strong></td></tr> <tr><td>Current <code>force=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Proposed <code>revoke=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Current <code>force=true</code></td><td>✅</td><td>❌</td><td>✅</td></tr> <tr><td>Proposed <code>revoke=true</code></td><td>✅</td><td>❌</td><td>✅</td></tr> <tr><td colspan="4"><strong>Change <code>force</code> param </strong></td></tr> <tr><td>Proposed <code>force=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Proposed <code>force=true</code></td><td>✅</td><td>✅</td><td>❌</td></tr> <tr><td>Proposed <code>force=true</code> & <code>revoke=true</code></td><td>✅</td><td>✅</td><td>✅</td></tr> </table> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### Changes required for consumers Any call to `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll` which passes the `force` param should change to `revoke` to maintain the current behavior.
Closed by #97041 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this issue
Apr 14, 2021
## Summary - fcbc9d9 Rename `force` param to `revoke` for `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll` - 03b9b90 Add new `force` param See elastic#96873 for background <table> <thead> <tr> <td rowspan="2"></td><td colspan="2">Unenroll Agent</td><td rowspan="2">Revoke API Keys</td> </tr> <tr> <td>Regular</td><td>Hosted</td></td> </tr> </thead> <tr><td colspan="4"><strong>Rename <code>force</code> to <code>revoke</code></strong></td></tr> <tr><td>Current <code>force=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Proposed <code>revoke=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Current <code>force=true</code></td><td>✅</td><td>❌</td><td>✅</td></tr> <tr><td>Proposed <code>revoke=true</code></td><td>✅</td><td>❌</td><td>✅</td></tr> <tr><td colspan="4"><strong>Change <code>force</code> param </strong></td></tr> <tr><td>Proposed <code>force=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Proposed <code>force=true</code></td><td>✅</td><td>✅</td><td>❌</td></tr> <tr><td>Proposed <code>force=true</code> & <code>revoke=true</code></td><td>✅</td><td>✅</td><td>✅</td></tr> </table> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### Changes required for consumers Any call to `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll` which passes the `force` param should change to `revoke` to maintain the current behavior.
kibanamachine
added a commit
that referenced
this issue
Apr 15, 2021
## Summary - fcbc9d9 Rename `force` param to `revoke` for `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll` - 03b9b90 Add new `force` param See #96873 for background <table> <thead> <tr> <td rowspan="2"></td><td colspan="2">Unenroll Agent</td><td rowspan="2">Revoke API Keys</td> </tr> <tr> <td>Regular</td><td>Hosted</td></td> </tr> </thead> <tr><td colspan="4"><strong>Rename <code>force</code> to <code>revoke</code></strong></td></tr> <tr><td>Current <code>force=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Proposed <code>revoke=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Current <code>force=true</code></td><td>✅</td><td>❌</td><td>✅</td></tr> <tr><td>Proposed <code>revoke=true</code></td><td>✅</td><td>❌</td><td>✅</td></tr> <tr><td colspan="4"><strong>Change <code>force</code> param </strong></td></tr> <tr><td>Proposed <code>force=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Proposed <code>force=true</code></td><td>✅</td><td>✅</td><td>❌</td></tr> <tr><td>Proposed <code>force=true</code> & <code>revoke=true</code></td><td>✅</td><td>✅</td><td>✅</td></tr> </table> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### Changes required for consumers Any call to `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll` which passes the `force` param should change to `revoke` to maintain the current behavior. Co-authored-by: John Schulz <john.schulz@elastic.co>
madirey
pushed a commit
to madirey/kibana
that referenced
this issue
May 11, 2021
## Summary - fcbc9d9 Rename `force` param to `revoke` for `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll` - 03b9b90 Add new `force` param See elastic#96873 for background <table> <thead> <tr> <td rowspan="2"></td><td colspan="2">Unenroll Agent</td><td rowspan="2">Revoke API Keys</td> </tr> <tr> <td>Regular</td><td>Hosted</td></td> </tr> </thead> <tr><td colspan="4"><strong>Rename <code>force</code> to <code>revoke</code></strong></td></tr> <tr><td>Current <code>force=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Proposed <code>revoke=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Current <code>force=true</code></td><td>✅</td><td>❌</td><td>✅</td></tr> <tr><td>Proposed <code>revoke=true</code></td><td>✅</td><td>❌</td><td>✅</td></tr> <tr><td colspan="4"><strong>Change <code>force</code> param </strong></td></tr> <tr><td>Proposed <code>force=false|undefined</code></td><td>✅</td><td>❌</td><td>❌</td></tr> <tr><td>Proposed <code>force=true</code></td><td>✅</td><td>✅</td><td>❌</td></tr> <tr><td>Proposed <code>force=true</code> & <code>revoke=true</code></td><td>✅</td><td>✅</td><td>✅</td></tr> </table> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### Changes required for consumers Any call to `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll` which passes the `force` param should change to `revoke` to maintain the current behavior.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Current behavior
The
/agents/{agent_id}/unenroll
&/agents/bulk_unenroll
Fleet endpoints support aforce
parameter to immediately revoke the API keys for an agent.Problem
The
unenroll
endpoints are the only ones to useforce
this way. All the other Fleet endpoints which have aforce
param use it as a signal to "attempt or execute regardless of permissions". Much like the--force
flag in many CLI programs.Proposed solution
Breaking API change or backwards-incompatible, at least
force
torevoke
(suggestions welcome. some others considered were:invalidate
,revoke_tokens
,invaldate_keys
)force
param to follow the convention of ignoring certain restrictionsIn matrix form:
force
torevoke
force=false|undefined
revoke=false|undefined
force=true
revoke=true
force
paramforce=false|undefined
force=true
force=true
&revoke=true
Changes required for consumers
Any call to
/agents/{agent_id}/unenroll
&/agents/bulk_unenroll
which passes theforce
param should change torevoke
to maintain the current behavior.I'd prefer not to make a breaking change, but I think it's unavoidable if we want consistency with the rest of the Fleet API.
Impact on consumers who continue using
force
to mean "revoke tokens"The agent will still be logged out, but it will not revoke the APIs.
force=true
force=true
The text was updated successfully, but these errors were encountered: