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

FEAT: Federated connections #1879

Open
wants to merge 6 commits into
base: v4-backup
Choose a base branch
from
Open

Conversation

tusharpandey13
Copy link
Contributor

@tusharpandey13 tusharpandey13 commented Feb 2, 2025

WIP

  • Moved authentication server metadata discovery to a separate stateful class for use in both authentication and FC exchange methods; this maintains an in-memory cache of metadata.
  • Added a getFCAT method with checks for existing FCATs and writeback to the session store.
  • Moved encrypted cookie read and write logic to a dedicated storage layer, abstracting session store methods.
  • Implemented FC exchange functionality.
  • Created a class to handle FCAT serialization/deserialization, including cookie storage logic.
  • Added logic to serialize/deserialize FCATs along with session data to the cookie store.
  • Added a federatedConnectiontMap property.

Please see comments below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Authentication server metadata discovery is moved to a seperate stateful class since it is also used in FC exchange method.
  2. nullish coalescing operator is used in favour of logical OR
  3. getAudience() getter added
  4. Added class members for FederatedConnections classs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Authentication server metadata discovery is moved here, this maintains an in-memory cache of the metadata, something that was maintained in the auth-client itself as a class member.
Since this is used in FC exchange function as well, de-coupled the implementation from auth client.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Simplified logic of various method by extracting repeated code.
  2. Added getFCAT method with check for existing FCAT and writeback to session store.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved encrypted cookie read and write logic to this storage layer.
This also abstracts the sessionstore methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Performs FC exchange.
Only contains code releavant to exchange.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deals with FCAT serialization/deserialization processes.
Contains low-level logic for how FCATs are stored in the cookie store.
Maintains a 2-level map of provider:audience:FCAT

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add logic to serialize/deserialize FCATs along with session data to cookie store.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added federatedConnectiontMap prop.

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.

3 participants