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

[Backport 1.x] Split up a value into multiple cookie payloads #1702

Closed

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Dec 18, 2023

Description

This Pull Request backports cookie-splitter functionality together with later regression fixes to 1.x branch of Security Plugin.

Builds on top of #1662, by incorporating init changes from #1110

Category

Maintenance

Backport - Distributing main branch features to other living branches

Why these changes are required?

It was a response to a user's demand

What is the old behavior before changes and new behavior after changes?

If the user was granted a large number of roles (>100), their size of the cookie could pass the upper limit defined by the browsers (4093 bytes). This PR solves the issue by splitting them in multiple cookie values.

Described in details in the 1352 - The original cookie splitting PR

Issues Resolved

It's a backport.

Related Issues:

Related PRs:

Testing

Backported functionality comes with the tests

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

DarshitChanpura and others added 19 commits July 19, 2023 07:22
…pensearch-project#1450) (opensearch-project#1517)

* Switch to new tenant after loading a copied long URL (opensearch-project#1450)

Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Co-authored-by: leanneeliatra <[email protected]>
…s resolved (opensearch-project#1462) (opensearch-project#1516)

* Add the tenant into the short URL once the short URL is resolved (opensearch-project#1462)

* More information added

Signed-off-by: leanneeliatra <[email protected]>

* More information added

Signed-off-by: leanneeliatra <[email protected]>

* fixed linting errors

Signed-off-by: leanneeliatra <[email protected]>

* Removing Prerequisite Checks Workflow (opensearch-project#1456)

Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Removing Prerequisite Checks Workflow (opensearch-project#1456)

Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Removing Prerequisite Checks Workflow (opensearch-project#1456)

Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Extracting function to tenant_resolver and adding more appropriate comments.

Signed-off-by: leanneeliatra <[email protected]>

* lint errors fixed

Signed-off-by: leanneeliatra <[email protected]>

* Use version from package.json for integration tests (opensearch-project#1463)

* Use version from package.json for integration tests

Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Adds 2.8 release notes (opensearch-project#1464)

Signed-off-by: Darshit Chanpura <[email protected]>
Co-authored-by: Ryan Liang <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Cleaning up comments

Signed-off-by: Leanne Lacey-Byrne <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* linting issues resolved

Signed-off-by: leanneeliatra <[email protected]>

* Removing Prerequisite Checks Workflow (opensearch-project#1456)

Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Removing Prerequisite Checks Workflow (opensearch-project#1456)

Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Update server/multitenancy/tenant_resolver.ts

Co-authored-by: Darshit Chanpura <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* comments addressed & linting amended

Signed-off-by: leanneeliatra <[email protected]>

* integration test fix following rebase

Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

---------

Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Leanne Lacey-Byrne <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>
Co-authored-by: Ryan Liang <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
Co-authored-by: Darshit Chanpura <[email protected]>
(cherry picked from commit e9f9576)

* Linter fix

Signed-off-by: Darshit Chanpura <[email protected]>

---------

Signed-off-by: Darshit Chanpura <[email protected]>
Co-authored-by: leanneeliatra <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
)

* Fix a bad import path

- Resolves opensearch-project#1487

Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Co-authored-by: Ryan Liang <[email protected]>
(cherry picked from commit 32c02c8)

Co-authored-by: Peter Nied <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Jochen Kressin <[email protected]>
…n set within the current request

Signed-off-by: Jochen Kressin <[email protected]>
* Increment version to 1.3.14.0

Signed-off-by: Craig Perkins <[email protected]>

* Pass in admin as admin password

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@cwperks cwperks changed the title Backport cookie splitter [Backport 1.x] Split up a value into multiple cookie payloads Dec 18, 2023
@cwperks cwperks mentioned this pull request Dec 18, 2023
3 tasks
Copy link

codecov bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0319257) 72.48% compared to head (4e67bfc) 72.48%.

Additional details and impacted files
@@           Coverage Diff           @@
##              1.x    #1702   +/-   ##
=======================================
  Coverage   72.48%   72.48%           
=======================================
  Files          88       88           
  Lines        1926     1926           
  Branches      251      246    -5     
=======================================
  Hits         1396     1396           
  Misses        474      474           
  Partials       56       56           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Craig Perkins <[email protected]>
@cwperks
Copy link
Member Author

cwperks commented Dec 19, 2023

@jochen-kressin This will resolve the CI failures seen on #1662. I'm closing this PR, but this should help resolve the CI failures seen on the other PR.

@cwperks cwperks closed this Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants