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

Surface Kibana security route deprecations in Upgrade Assistant #199656

Merged
merged 14 commits into from
Nov 19, 2024

Conversation

jeramysoucy
Copy link
Contributor

@jeramysoucy jeramysoucy commented Nov 11, 2024

Closes #197389

Summary

Uses the deprecated route configuration option on all Kibana Security "v1" endpoints. This will surface deprecation information in the Upgrade Assistant.

Related PRs

Testing

  1. Start ES & Kibana in trial license mode
  2. Make several calls to one or more of the deprecated endpoints
  3. Navigate to Stack Management->Upgrade Assistant
  4. Click on Kibana warnings
Screenshot 2024-11-18 at 10 01 10 AM 5. Confirm the called endpoints are displayed as warnings in the Upgrade Assistant Screenshot 2024-11-18 at 9 59 34 AM

Previous release notes

v7.6.0

https://www.elastic.co/guide/en/kibana/7.6/release-notes-7.6.0.html#deprecation-7.6.0
https://www.elastic.co/guide/en/kibana/7.6/breaking-changes-7.6.html
The deprecations are not listed in the release notes or breaking changes notes.

v8.0.0

https://www.elastic.co/guide/en/kibana/current/release-notes-8.0.0-alpha1.html#rest-api-changes
SAML endpoint deprecation only appears in the 8.0.0-alpha1 release notes, and was reverted in 8.0.0-alpha2

Release note

See docs/upgrade-notes.asciidoc in file changes

Follow-up

A follow-up PR must be created to create and backfill the docLinks.

@jeramysoucy jeramysoucy added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! backport:prev-major Backport to (8.x, 8.17, 8.16, 8.15) the previous major branch and other branches in development v9.0.0 v8.17.0 release_note:skip Skip the PR/issue when compiling release notes release_note:deprecation and removed release_note:skip Skip the PR/issue when compiling release notes labels Nov 11, 2024
@jeramysoucy jeramysoucy changed the title Surfaces Kibana security route deprecations in Upgrade Assistant Surface Kibana security route deprecations in Upgrade Assistant Nov 11, 2024
Comment on lines -808 to -827
[discrete]
[[breaking-47929]]
.[Security] Removed `/api/security/v1/saml` route. (8.0)
[%collapsible]
====
*Details* +
The `/api/security/v1/saml` route has been removed and is reflected in the kibana.yml `server.xsrf.whitelist` setting, {es}, and the Identity Provider SAML settings. For more information, refer to {kibana-pull}47929[#47929]

*Impact* +
Use the `/api/security/saml/callback` route, or wait to upgrade to 8.0.0-alpha2 when the `/api/security/saml/callback` route breaking change is reverted.
====
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 opted to remove this section as it seemed redundant with the new section. Plus it was only applicable to 8.0.0-alpha1.

Copy link
Contributor

Choose a reason for hiding this comment

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

After #199519 main will only contain 9.0+ changes for this file

@jeramysoucy jeramysoucy marked this pull request as ready for review November 14, 2024 07:05
@jeramysoucy jeramysoucy requested a review from a team as a code owner November 14, 2024 07:05
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@jeramysoucy jeramysoucy requested review from a team November 14, 2024 07:05
Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for populating these fields @jeramysoucy ! I left a q about populating the links so long.

Did not test locally, are the deprecations showing up as expected in UA?

@@ -57,11 +59,27 @@ export function defineCommonRoutes({
excludeFromOAS: true,
authRequired: false,
tags: [ROUTE_TAG_CAN_REDIRECT, ROUTE_TAG_AUTH_FLOW],
...(isDeprecated && {
deprecated: {
documentationUrl: 'https://elastic.co', // ToDo: Update with docLink to upgrade note
Copy link
Contributor

Choose a reason for hiding this comment

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

With the PR known and the release note added, I think we can go ahead and populate this following the template's instructions about doc links. Ditto for other instances!

Copy link
Contributor Author

@jeramysoucy jeramysoucy Nov 18, 2024

Choose a reason for hiding this comment

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

@jeramysoucy
Copy link
Contributor Author

Did not test locally, are the deprecations showing up as expected in UA?

I tested with a couple of the routes, and the deprecations showed up in the UA, however there was a bit of a delay from calling the APIs to when the UA would begin displaying them.

Copy link
Contributor

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

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

LGTM from docs perspective. Thanks for completing the upgrade-notes file. Note that this file will just contain 9.0+ entries on main after I merge #199519

Comment on lines -808 to -827
[discrete]
[[breaking-47929]]
.[Security] Removed `/api/security/v1/saml` route. (8.0)
[%collapsible]
====
*Details* +
The `/api/security/v1/saml` route has been removed and is reflected in the kibana.yml `server.xsrf.whitelist` setting, {es}, and the Identity Provider SAML settings. For more information, refer to {kibana-pull}47929[#47929]

*Impact* +
Use the `/api/security/saml/callback` route, or wait to upgrade to 8.0.0-alpha2 when the `/api/security/saml/callback` route breaking change is reverted.
====
Copy link
Contributor

Choose a reason for hiding this comment

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

After #199519 main will only contain 9.0+ changes for this file

@azasypkin azasypkin self-requested a review November 18, 2024 10:08
Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Tested locally, everything works as expected.

@jeramysoucy jeramysoucy requested a review from a team as a code owner November 18, 2024 13:46
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #12 / DeleteConfirmationModal calls onConfirm

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiAssistantManagementSelection 92.5KB 92.5KB +74.0B
lists 144.9KB 145.0KB +74.0B
total +148.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 453.9KB 453.9KB +74.0B

History

@jeramysoucy jeramysoucy merged commit 742ae9f into elastic:main Nov 19, 2024
24 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.15, 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11909463316

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.15 Backport failed because of merge conflicts
8.16 Backport failed because of merge conflicts
8.x Backport failed because of merge conflicts

You might need to backport the following PRs to 8.x:
- Changes deprecated SO HTTP APIs deprecation field to object (#197936)

Manual backport

To create the backport manually run:

node scripts/backport --pr 199656

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 21, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 199656 locally

@jeramysoucy jeramysoucy added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.18.0 and removed backport:prev-major Backport to (8.x, 8.17, 8.16, 8.15) the previous major branch and other branches in development labels Nov 22, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/11969286800

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.17 Backport failed because of merge conflicts
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 199656

Questions ?

Please refer to the Backport tool documentation

@jeramysoucy
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

jeramysoucy added a commit to jeramysoucy/kibana that referenced this pull request Nov 22, 2024
…tic#199656)

Closes elastic#197389

## Summary

Uses the `deprecated` route configuration option on all Kibana Security
"v1" endpoints. This will surface deprecation information in the Upgrade
Assistant.

## Related PRs
- elastic#50695 - `7.6.0`, deprecated
    - `/api/security/v1/me`
    - `/api/security/v1/logout`
    - `/api/security/v1/oidc/implicit`
    - `/api/security/v1/oidc` (POST)
- elastic#53886 - `7.6.0`, deprecated
`/api/security/v1/oidc` (GET)
- elastic#47929 - `8.0.0`, dropped
`/api/security/v1/saml` (`breaking` release note)
- elastic#106665 - restored
`/api/security/v1/saml` but warned as deprecated (no release note)

## Testing
1.  Start ES & Kibana in trial license mode
2. Make several calls to one or more of the deprecated endpoints
3. Navigate to `Stack Management`->`Upgrade Assistant`
4. Click on Kibana warnings
<img width="1003" alt="Screenshot 2024-11-18 at 10 01 10 AM"
src="https://github.com/user-attachments/assets/da44af13-57eb-4ffd-a507-e423eb767a11">
5. Confirm the called endpoints are displayed as warnings in the Upgrade
Assistant
<img width="1274" alt="Screenshot 2024-11-18 at 9 59 34 AM"
src="https://github.com/user-attachments/assets/4c054fbe-6838-48cf-8b1b-8c161252db0f">

## Previous release notes
### v7.6.0

https://www.elastic.co/guide/en/kibana/7.6/release-notes-7.6.0.html#deprecation-7.6.0
https://www.elastic.co/guide/en/kibana/7.6/breaking-changes-7.6.html
The deprecations are not listed in the release notes or breaking changes
notes.

### v8.0.0

https://www.elastic.co/guide/en/kibana/current/release-notes-8.0.0-alpha1.html#rest-api-changes
SAML endpoint deprecation only appears in the 8.0.0-alpha1 release
notes, and was reverted in 8.0.0-alpha2

# Release note
See `docs/upgrade-notes.asciidoc` in file changes

# Follow-up
A follow-up PR must be created to create and backfill the docLinks.

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 742ae9f)

# Conflicts:
#	docs/upgrade-notes.asciidoc
#	x-pack/plugins/security/tsconfig.json
jeramysoucy added a commit that referenced this pull request Nov 22, 2024
…#199656) (#201320)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Surface Kibana security route deprecations in Upgrade Assistant
(#199656)](#199656)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jeramy
Soucy","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-19T08:54:40Z","message":"Surface
Kibana security route deprecations in Upgrade Assistant
(#199656)\n\nCloses #197389\r\n\r\n## Summary\r\n\r\nUses the
`deprecated` route configuration option on all Kibana Security\r\n\"v1\"
endpoints. This will surface deprecation information in the
Upgrade\r\nAssistant.\r\n\r\n## Related PRs\r\n-
#50695 - `7.6.0`, deprecated\r\n -
`/api/security/v1/me`\r\n - `/api/security/v1/logout`\r\n -
`/api/security/v1/oidc/implicit`\r\n - `/api/security/v1/oidc`
(POST)\r\n- #53886 - `7.6.0`,
deprecated\r\n`/api/security/v1/oidc` (GET)\r\n-
#47929 - `8.0.0`,
dropped\r\n`/api/security/v1/saml` (`breaking` release note)\r\n-
#106665 -
restored\r\n`/api/security/v1/saml` but warned as deprecated (no release
note)\r\n\r\n## Testing\r\n1. Start ES & Kibana in trial license
mode\r\n2. Make several calls to one or more of the deprecated
endpoints\r\n3. Navigate to `Stack Management`->`Upgrade
Assistant`\r\n4. Click on Kibana warnings\r\n<img width=\"1003\"
alt=\"Screenshot 2024-11-18 at 10 01
10 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/da44af13-57eb-4ffd-a507-e423eb767a11\">\r\n5.
Confirm the called endpoints are displayed as warnings in the
Upgrade\r\nAssistant\r\n<img width=\"1274\" alt=\"Screenshot 2024-11-18
at 9 59
34 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/4c054fbe-6838-48cf-8b1b-8c161252db0f\">\r\n\r\n##
Previous release notes \r\n###
v7.6.0\r\n\r\nhttps://www.elastic.co/guide/en/kibana/7.6/release-notes-7.6.0.html#deprecation-7.6.0\r\nhttps://www.elastic.co/guide/en/kibana/7.6/breaking-changes-7.6.html\r\nThe
deprecations are not listed in the release notes or breaking
changes\r\nnotes.\r\n\r\n###
v8.0.0\r\n\r\nhttps://www.elastic.co/guide/en/kibana/current/release-notes-8.0.0-alpha1.html#rest-api-changes\r\nSAML
endpoint deprecation only appears in the 8.0.0-alpha1 release\r\nnotes,
and was reverted in 8.0.0-alpha2\r\n\r\n# Release note\r\nSee
`docs/upgrade-notes.asciidoc` in file changes\r\n\r\n# Follow-up\r\nA
follow-up PR must be created to create and backfill the
docLinks.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"742ae9fd2a255d5ba15100d644e7de3540e28f60","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:deprecation","Team:Security","backport
missing","v9.0.0","backport:prev-minor","v8.18.0"],"number":199656,"url":"https://github.com/elastic/kibana/pull/199656","mergeCommit":{"message":"Surface
Kibana security route deprecations in Upgrade Assistant
(#199656)\n\nCloses #197389\r\n\r\n## Summary\r\n\r\nUses the
`deprecated` route configuration option on all Kibana Security\r\n\"v1\"
endpoints. This will surface deprecation information in the
Upgrade\r\nAssistant.\r\n\r\n## Related PRs\r\n-
#50695 - `7.6.0`, deprecated\r\n -
`/api/security/v1/me`\r\n - `/api/security/v1/logout`\r\n -
`/api/security/v1/oidc/implicit`\r\n - `/api/security/v1/oidc`
(POST)\r\n- #53886 - `7.6.0`,
deprecated\r\n`/api/security/v1/oidc` (GET)\r\n-
#47929 - `8.0.0`,
dropped\r\n`/api/security/v1/saml` (`breaking` release note)\r\n-
#106665 -
restored\r\n`/api/security/v1/saml` but warned as deprecated (no release
note)\r\n\r\n## Testing\r\n1. Start ES & Kibana in trial license
mode\r\n2. Make several calls to one or more of the deprecated
endpoints\r\n3. Navigate to `Stack Management`->`Upgrade
Assistant`\r\n4. Click on Kibana warnings\r\n<img width=\"1003\"
alt=\"Screenshot 2024-11-18 at 10 01
10 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/da44af13-57eb-4ffd-a507-e423eb767a11\">\r\n5.
Confirm the called endpoints are displayed as warnings in the
Upgrade\r\nAssistant\r\n<img width=\"1274\" alt=\"Screenshot 2024-11-18
at 9 59
34 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/4c054fbe-6838-48cf-8b1b-8c161252db0f\">\r\n\r\n##
Previous release notes \r\n###
v7.6.0\r\n\r\nhttps://www.elastic.co/guide/en/kibana/7.6/release-notes-7.6.0.html#deprecation-7.6.0\r\nhttps://www.elastic.co/guide/en/kibana/7.6/breaking-changes-7.6.html\r\nThe
deprecations are not listed in the release notes or breaking
changes\r\nnotes.\r\n\r\n###
v8.0.0\r\n\r\nhttps://www.elastic.co/guide/en/kibana/current/release-notes-8.0.0-alpha1.html#rest-api-changes\r\nSAML
endpoint deprecation only appears in the 8.0.0-alpha1 release\r\nnotes,
and was reverted in 8.0.0-alpha2\r\n\r\n# Release note\r\nSee
`docs/upgrade-notes.asciidoc` in file changes\r\n\r\n# Follow-up\r\nA
follow-up PR must be created to create and backfill the
docLinks.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"742ae9fd2a255d5ba15100d644e7de3540e28f60"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199656","number":199656,"mergeCommit":{"message":"Surface
Kibana security route deprecations in Upgrade Assistant
(#199656)\n\nCloses #197389\r\n\r\n## Summary\r\n\r\nUses the
`deprecated` route configuration option on all Kibana Security\r\n\"v1\"
endpoints. This will surface deprecation information in the
Upgrade\r\nAssistant.\r\n\r\n## Related PRs\r\n-
#50695 - `7.6.0`, deprecated\r\n -
`/api/security/v1/me`\r\n - `/api/security/v1/logout`\r\n -
`/api/security/v1/oidc/implicit`\r\n - `/api/security/v1/oidc`
(POST)\r\n- #53886 - `7.6.0`,
deprecated\r\n`/api/security/v1/oidc` (GET)\r\n-
#47929 - `8.0.0`,
dropped\r\n`/api/security/v1/saml` (`breaking` release note)\r\n-
#106665 -
restored\r\n`/api/security/v1/saml` but warned as deprecated (no release
note)\r\n\r\n## Testing\r\n1. Start ES & Kibana in trial license
mode\r\n2. Make several calls to one or more of the deprecated
endpoints\r\n3. Navigate to `Stack Management`->`Upgrade
Assistant`\r\n4. Click on Kibana warnings\r\n<img width=\"1003\"
alt=\"Screenshot 2024-11-18 at 10 01
10 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/da44af13-57eb-4ffd-a507-e423eb767a11\">\r\n5.
Confirm the called endpoints are displayed as warnings in the
Upgrade\r\nAssistant\r\n<img width=\"1274\" alt=\"Screenshot 2024-11-18
at 9 59
34 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/4c054fbe-6838-48cf-8b1b-8c161252db0f\">\r\n\r\n##
Previous release notes \r\n###
v7.6.0\r\n\r\nhttps://www.elastic.co/guide/en/kibana/7.6/release-notes-7.6.0.html#deprecation-7.6.0\r\nhttps://www.elastic.co/guide/en/kibana/7.6/breaking-changes-7.6.html\r\nThe
deprecations are not listed in the release notes or breaking
changes\r\nnotes.\r\n\r\n###
v8.0.0\r\n\r\nhttps://www.elastic.co/guide/en/kibana/current/release-notes-8.0.0-alpha1.html#rest-api-changes\r\nSAML
endpoint deprecation only appears in the 8.0.0-alpha1 release\r\nnotes,
and was reverted in 8.0.0-alpha2\r\n\r\n# Release note\r\nSee
`docs/upgrade-notes.asciidoc` in file changes\r\n\r\n# Follow-up\r\nA
follow-up PR must be created to create and backfill the
docLinks.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"742ae9fd2a255d5ba15100d644e7de3540e28f60"}},{"branch":"8.18","label":"v8.18.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 22, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…tic#199656)

Closes elastic#197389

## Summary

Uses the `deprecated` route configuration option on all Kibana Security
"v1" endpoints. This will surface deprecation information in the Upgrade
Assistant.

## Related PRs
- elastic#50695 - `7.6.0`, deprecated
    - `/api/security/v1/me`
    - `/api/security/v1/logout`
    - `/api/security/v1/oidc/implicit`
    - `/api/security/v1/oidc` (POST)
- elastic#53886 - `7.6.0`, deprecated
`/api/security/v1/oidc` (GET)
- elastic#47929 - `8.0.0`, dropped
`/api/security/v1/saml` (`breaking` release note)
- elastic#106665 - restored
`/api/security/v1/saml` but warned as deprecated (no release note)

## Testing
1.  Start ES & Kibana in trial license mode
2. Make several calls to one or more of the deprecated endpoints
3. Navigate to `Stack Management`->`Upgrade Assistant`
4. Click on Kibana warnings
<img width="1003" alt="Screenshot 2024-11-18 at 10 01 10 AM"
src="https://github.com/user-attachments/assets/da44af13-57eb-4ffd-a507-e423eb767a11">
5. Confirm the called endpoints are displayed as warnings in the Upgrade
Assistant
<img width="1274" alt="Screenshot 2024-11-18 at 9 59 34 AM"
src="https://github.com/user-attachments/assets/4c054fbe-6838-48cf-8b1b-8c161252db0f">

## Previous release notes 
### v7.6.0

https://www.elastic.co/guide/en/kibana/7.6/release-notes-7.6.0.html#deprecation-7.6.0
https://www.elastic.co/guide/en/kibana/7.6/breaking-changes-7.6.html
The deprecations are not listed in the release notes or breaking changes
notes.

### v8.0.0

https://www.elastic.co/guide/en/kibana/current/release-notes-8.0.0-alpha1.html#rest-api-changes
SAML endpoint deprecation only appears in the 8.0.0-alpha1 release
notes, and was reverted in 8.0.0-alpha2

# Release note
See `docs/upgrade-notes.asciidoc` in file changes

# Follow-up
A follow-up PR must be created to create and backfill the docLinks.

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:deprecation Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Surface deprecation of platform security v1 endpoints
6 participants