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: add basic token authentication between server and clients #290

Merged
merged 10 commits into from
Aug 30, 2024

Conversation

Manuthor
Copy link
Contributor

@Manuthor Manuthor commented Aug 19, 2024

Authenticated mode

In authenticated mode, the server requires authentication for all requests. The authentication
method can be either (one of them is enough):

  • a TLS client certificate and the server extracts the username from the certificate's subject
    common name (CN)
  • or a JWT access token and the server extracts the username from the token's subject (sub) claim
  • an API token passed in the Authorization header configured both at the client and server side (user being default-username)

The server can be configured to use multiple authentication methods concurrently:

  • if server is started with TLS client certificate authentication, client MUST provide a valid certificate issued by the authority certificate provided by the server ;
  • if server only provides JWT and API token authentication, client MUST provide a valid JWT token or an API token in the Authorization header. Server will first try to authenticate using the JWT token, then the API token if JWT token is not provided.

@Manuthor Manuthor force-pushed the feat/auth_support branch 4 times, most recently from dc0fcda to a2dab31 Compare August 22, 2024 15:44
@Manuthor Manuthor requested a review from ccorsin August 29, 2024 11:17
@Manuthor Manuthor merged commit aaa74c7 into develop Aug 30, 2024
35 checks passed
@Manuthor Manuthor deleted the feat/auth_support branch August 30, 2024 15:05
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.

2 participants