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

Implement Authintercept interface to communicate with configured http service #53

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

Chinmay1412
Copy link
Contributor

@Chinmay1412 Chinmay1412 commented Jul 31, 2021

Issue number of the reported bug or feature request: RDSIRABBIT-1972

Implement Authintercept interface
The interface for authintercept was already introduced(#11). This PR basically add an implementation for that interface. So that all connecting clients can be authorised using external configured http auth gate service. The PR also adds custom AUTH (SERVICE hostname port target | ALWAYS_ALLOW | PRINT) command, which can be used to configure http auth gate service or disable/enable auth mechanism. The PR also adds the schema for http auth gate service. The auth gate service will be plugable easily in amqpprox setup. By default all the connecting clients will not be authenticated and will be allowed to connect to broker directly during initial handshake. But one can easily enable, disable or configure auth gate service using control command. Each connection handshake request will be passed to authintercept component before starting handshake with broker. The SASL information retrieved from client START-OK method is forwarded to external http service, if configured. The external http service will authenticate client based on that information, and can provide the auth result(allow/deny) with reason and modified SASL information. Then the modified SASL information will be passed to the broker during handshake. If external http service doesn't provide any SASL information, in that case amqpprox will forward same SASL information, provided by client, to the broker during handshake.

Testing performed
This PR adds unit tests for implemented interface. The testing is also performed by manually running control commands to configure http auth gate service or disable auth mechanism.

@Chinmay1412 Chinmay1412 marked this pull request as ready for review August 9, 2021 17:48
authproto/authrequest.proto Show resolved Hide resolved
docs/config.md Outdated Show resolved Hide resolved
docs/config.md Show resolved Hide resolved
libamqpprox/amqpprox_httpauthintercept.cpp Outdated Show resolved Hide resolved
libamqpprox/amqpprox_httpauthintercept.cpp Outdated Show resolved Hide resolved
libamqpprox/amqpprox_httpauthintercept.cpp Outdated Show resolved Hide resolved
libamqpprox/amqpprox_httpauthintercept.cpp Outdated Show resolved Hide resolved
libamqpprox/amqpprox_httpauthintercept.cpp Outdated Show resolved Hide resolved
@Chinmay1412 Chinmay1412 requested a review from adamncasey August 20, 2021 14:53
Copy link
Contributor

@adamncasey adamncasey left a comment

Choose a reason for hiding this comment

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

Mainly documentation tweaks

libamqpprox/amqpprox_httpauthintercept.cpp Outdated Show resolved Hide resolved
authproto/README.md Outdated Show resolved Hide resolved
authproto/README.md Outdated Show resolved Hide resolved
authproto/README.md Outdated Show resolved Hide resolved
authproto/README.md Outdated Show resolved Hide resolved
libamqpprox/amqpprox_httpauthintercept.cpp Show resolved Hide resolved
@Chinmay1412 Chinmay1412 force-pushed the implement-authintercept branch from dfab862 to dac4cec Compare August 23, 2021 10:35
@Chinmay1412 Chinmay1412 merged commit 6ff3847 into main Aug 23, 2021
@Chinmay1412 Chinmay1412 deleted the implement-authintercept branch August 23, 2021 11:46
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