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

Abstract authenticator #921

Merged
merged 18 commits into from
Feb 10, 2025
Merged

Abstract authenticator #921

merged 18 commits into from
Feb 10, 2025

Conversation

kickster97
Copy link
Member

@kickster97 kickster97 commented Jan 22, 2025

WHAT is this pull request doing?

This is a preparatory step towards introducing multiple authentication backends, which can be tried and run on a chain of command. (It breaks up #861 so it dosn't become to large)
This PR introduces the basic authenticator, which entails the basic authentication method we already support.

These modules will be extended with oauth and http support in the future.

Adds property auth_backends : Array(String) = ["basic"] to config.
This property is not parseable yet, because there is no other authentication backend available.
This will be able to expand and become configurable when new auth backends are added.

HOW can this pull request be tested?

includes some very basic specs, will be able to test more when we add multiple authentication backends.

@kickster97 kickster97 requested a review from a team as a code owner January 22, 2025 13:57
@kickster97 kickster97 force-pushed the authentication-chain branch from fc4c424 to 0161b46 Compare January 23, 2025 13:09
src/lavinmq/auth/chain.cr Outdated Show resolved Hide resolved
@kickster97 kickster97 changed the title introduce auth_chain, abstract authenticator and the basic authenticator Abstract authenticator Feb 4, 2025
Copy link
Member

@spuun spuun left a comment

Choose a reason for hiding this comment

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

Just minor stuff.

spec/auth_spec.cr Outdated Show resolved Hide resolved
src/lavinmq/config.cr Outdated Show resolved Hide resolved
src/lavinmq/auth/chain.cr Outdated Show resolved Hide resolved
src/lavinmq/amqp/connection_factory.cr Outdated Show resolved Hide resolved
src/lavinmq/auth/authenticators/basic.cr Outdated Show resolved Hide resolved
src/lavinmq/amqp/connection_factory.cr Outdated Show resolved Hide resolved
src/lavinmq/amqp/connection_factory.cr Outdated Show resolved Hide resolved
src/lavinmq/amqp/connection_factory.cr Outdated Show resolved Hide resolved
@kickster97 kickster97 requested a review from spuun February 7, 2025 13:07
Copy link
Member

@spuun spuun left a comment

Choose a reason for hiding this comment

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

👍
The comments are optional.

src/lavinmq/auth/chain.cr Outdated Show resolved Hide resolved
src/lavinmq/auth/authenticator.cr Outdated Show resolved Hide resolved
src/lavinmq/amqp/connection_factory.cr Show resolved Hide resolved
@kickster97 kickster97 merged commit 2a21b8c into main Feb 10, 2025
22 of 25 checks passed
@kickster97 kickster97 deleted the authentication-chain branch February 10, 2025 14:11
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