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

Servantify brig's auth API #2750

Merged
merged 43 commits into from
Oct 24, 2022
Merged

Servantify brig's auth API #2750

merged 43 commits into from
Oct 24, 2022

Conversation

pcapriotti
Copy link
Contributor

@pcapriotti pcapriotti commented Oct 5, 2022

This PR introduces servant combinators for cookies and the Authorization header, and converts all of brig's auth endpoints to servant.

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Oct 5, 2022
@pcapriotti pcapriotti temporarily deployed to cachix October 5, 2022 07:57 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 5, 2022 07:57 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 5, 2022 10:01 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 5, 2022 10:01 Inactive
@smatting smatting temporarily deployed to cachix October 5, 2022 11:25 Inactive
@smatting smatting temporarily deployed to cachix October 5, 2022 11:25 Inactive
@smatting smatting temporarily deployed to cachix October 5, 2022 11:28 Inactive
@smatting smatting temporarily deployed to cachix October 5, 2022 11:28 Inactive
@smatting smatting temporarily deployed to cachix October 5, 2022 13:50 Inactive
@smatting smatting temporarily deployed to cachix October 5, 2022 13:50 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 5, 2022 14:01 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 5, 2022 14:01 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 5, 2022 15:16 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 5, 2022 15:16 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 6, 2022 11:27 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 6, 2022 11:27 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 6, 2022 12:32 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 6, 2022 12:32 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 6, 2022 14:40 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 6, 2022 14:40 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 7, 2022 12:11 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 7, 2022 12:11 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 7, 2022 12:12 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 7, 2022 12:12 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 20, 2022 12:21 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 20, 2022 12:38 Inactive
@pcapriotti pcapriotti temporarily deployed to cachix October 21, 2022 07:53 Inactive
Copy link
Contributor

@elland elland left a comment

Choose a reason for hiding this comment

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

🛳️

@pcapriotti pcapriotti merged commit 526544d into develop Oct 24, 2022
@pcapriotti pcapriotti deleted the pcapriotti/servantify-auth branch October 24, 2022 08:43
elland pushed a commit that referenced this pull request Oct 24, 2022
* Servant Cookie combinator

* Parse authorization header

* Remove confusing type synonyms

* Create schemas for Wire.API.User.Auth types

* Fix build and golden tests

* Add Access(..)

* Add mkSomeAccess and mkSomeCookie & adapt

* Optional response headers in MultiVerb

* Replace SomeCookie with UserTokenCookie

* Finish servantification of access endpoint

* Servantify send-login-code

* Servantify login endpoint

* Servantify logout endpoint

* Servantify change-self-email endpoint

* Servantify list-cookies endpoint

* Servantify remove-cookies endpoint

* Change status code to 200

* Servantify legalhold-login endpoint

* Servantify sso-login endpoint

* Servantify login-code endpoint

* Servantify reauthenticate endpoint

* Fix build

* Add access_token query parameter

* Parse cookies leniently

* Adapt integration test to new error codes

* Add CanThrow annotations

* Document Bearer token in Swagger

* Add CHANGELOG entry

* Revert "Adapt integration test to new error codes"

This reverts commit 165340a.

* Make servant cookie parser lenient

* More leniency in Servant parsers

* Adapt some tests

* Remove redundant Brig error

* Redundant brackets

* lbl → label

* Reformat long line

* Remove empty routes

* Apply hlint suggestions

* Regenerate nix derivations

Co-authored-by: Stefan Matting <stefan@wire.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants