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

box: add stub function to register extra security methods #8055

Merged
merged 2 commits into from
Dec 13, 2022

Conversation

locker
Copy link
Member

@locker locker commented Dec 13, 2022

This PR adds a stub function that will add extra authentication methods in Tarantool Enterprise Edition. Also, it fixes a bug in authenticate() that can result in a crash if there's more than one authentication method available.

Needed for https://github.com/tarantool/tarantool-ee/issues/295
Follow-up #7986

After checking that the received authentication method and type are
compatible with auth_request_check(), authenticate() tries to
authenticate it using the user's authentication method with
authenticate_request(). The problem is the user may use a different
authenticate method from the one received in the request while
authenticate_request() expects the request to be valid. As a result,
it may crash in this case. Fix this by ensuring that the user's
authentication method matches the one received in the request.

Follow-up commit b5754d3 ("box: make auth subsystem pluggable")
Follow-up tarantool#7986

NO_DOC=bug fix
NO_CHANGELOG=unreleased
NO_TEST=will be added to EE, because CE supports just one auth method
@alyapunov alyapunov assigned locker and unassigned alyapunov Dec 13, 2022
@locker locker added the full-ci Enables all tests for a pull request label Dec 13, 2022
This commit adds function stubs security_init and security_free that
are called after auth_init and before auth_free, respectively. We'll
define them in the EE repository along with the enabling macros:
ENABLE_SECURITY and SECURITY_SOURCES. We'll start with adding extra
authentication methods in security_init. Later on, we'll implement more
security features, like password strength enforcement or authentication
delay.

Needed for tarantool/tarantool-ee#295

NO_DOC=internal
NO_TEST=internal
NO_CHANGELOG=internal
@locker locker merged commit 3bca175 into tarantool:master Dec 13, 2022
@locker locker deleted the auth-methods-ee-stub branch December 13, 2022 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-ci Enables all tests for a pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants