Skip to content

Comments

Servantify brig's auth API#2750

Merged
pcapriotti merged 43 commits intodevelopfrom
pcapriotti/servantify-auth
Oct 24, 2022
Merged

Servantify brig's auth API#2750
pcapriotti merged 43 commits intodevelopfrom
pcapriotti/servantify-auth

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 force-pushed the pcapriotti/servantify-auth branch from d44a6c5 to 00ed245 Compare October 5, 2022 11:28
@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 force-pushed the pcapriotti/servantify-auth branch from 71abed8 to 63aa3de Compare October 6, 2022 12:32
@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 force-pushed the pcapriotti/servantify-auth branch from 464ef46 to 9ffac00 Compare October 7, 2022 12:11
@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 force-pushed the pcapriotti/servantify-auth branch from 9ffac00 to 53ba06a Compare October 7, 2022 12:12
@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 force-pushed the pcapriotti/servantify-auth branch from 53ba06a to aedd79e Compare October 7, 2022 13:30
@pcapriotti pcapriotti force-pushed the pcapriotti/servantify-auth branch from 6670373 to d218c43 Compare October 20, 2022 12:21
@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 165340ab3072d21fc72cf097c00aabd857c5f584.

* 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