Skip to content

Conversation

tianjing-li
Copy link
Collaborator

@tianjing-li tianjing-li commented Jun 10, 2024

This PR introduces OpenID Connect as an authentication strategy, alongside the existing Google OAuth and Basic Authentication strategies. It also adds the base scaffolding for adding a JWT token blacklist during logouts.

Changes:

  • Adds OpenIDConnect as an authentication strategy, including the necessary imports and class definition.
  • Updates the src/backend/config/auth.py file to import OpenIDConnect.
  • Modifies the src/backend/services/auth/__init__.py file to import OpenIDConnect.
  • Introduces the src/backend/services/auth/strategies/oidc.py file for the OpenIDConnect strategy implementation.
  • Updates the src/backend/routers/auth.py file to include OpenID Connect-related endpoints (/oidc/auth and /logout).
  • Adds a Blacklist table to store JWT access tokens that are blacklisted during logout.
  • Includes tests for creating and retrieving blacklist entries in src/backend/tests/crud/test_blacklist.py.
  • Updates the poetry.lock and pyproject.toml files with new dependencies.

scott-cohere
scott-cohere previously approved these changes Jun 10, 2024
Copy link
Collaborator

@EugeneLightsOn EugeneLightsOn left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just a few questions to clarify. Please take a look at my comments.

@tianjing-li tianjing-li merged commit 5155eee into main Jun 12, 2024
@tianjing-li tianjing-li deleted the add-oidc branch June 12, 2024 19:23
ClaytonSmith pushed a commit to MiniMap-ai/cohere-toolkit that referenced this pull request Jun 13, 2024
…cohere-ai#190)

* add oidc, blacklist logic

* Add auth

* Add logic for GET /auth

* Mods
ClaytonSmith added a commit to MiniMap-ai/cohere-toolkit that referenced this pull request Jun 17, 2024
* [coral-web] rename schema fields and update openapi client (cohere-ai#189)

* update

* update client

* Add use agents view env variable.  (cohere-ai#192)

* Change

* Format

* [backend] api_key not set for class methods (cohere-ai#191)

* fix

* easier fix

* perf: downgrade rehype-highlight and generate once blob url (cohere-ai#193)

* perf: downgrade rehype-highlight and generate once blob url

* fix: replace code blocks to iframe in conversation history

* refactor: run format

* refactor: pr feedback

* Add OIDC auth strategy, add Blacklist scaffolding (model/schema/crud) (cohere-ai#190)

* add oidc, blacklist logic

* Add auth

* Add logic for GET /auth

* Mods

* fix: html preview with citations (cohere-ai#200)

* [backend] adding tools for agents, filter tools by agent_id (cohere-ai#204)

* changes

* lint

* filter tools by agent

* lint

* update tests

* lint and squash migrations

* fix alembic migration err

* lint

* merge (#3)


* [backend] make deployment field optional in API and DB (cohere-ai#213)

---------

Co-authored-by: Tianjing Li <[email protected]>
Co-authored-by: Tomeu <[email protected]>
Co-authored-by: Scott <[email protected]>
Co-authored-by: Beatrix De Wilde <[email protected]>

* pulling from main

* cleaned backend docker image push

* syncing with main (conflicts)

---------

Co-authored-by: Scott <[email protected]>
Co-authored-by: Beatrix De Wilde <[email protected]>
Co-authored-by: Tomeu <[email protected]>
Co-authored-by: Tianjing Li <[email protected]>
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