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

Improve Ballerina authn & authz configurations #63

Closed
ldclakmal opened this issue Mar 23, 2020 · 0 comments · Fixed by ballerina-platform/module-ballerina-http#142
Closed
Assignees
Labels
Area/Security Issues related to stdlib security module/auth Type/Improvement Verson/SwanLakeDump All issues planned for Swan Lake GA release

Comments

@ldclakmal
Copy link
Member

ldclakmal commented Mar 23, 2020

Description:

Design

  • Authorization logic is currently limited on the scope attribute in every authentication mechanism (Basic Auth, JWT, OAuth2, LDAP). We need to improve this current ABAC approach providing the flexibility to user to build up own logic of authorization without limiting to the scope attribute we have now. But, from an implementation perspective, we must think carefully about how we can make it generic against all the authentication providers we support now, and we are yet to support. Also, apart from "static values" of the given attributes, we may have to consider how we can handle "dynamic values" of the given attributes, which may be used for authorization decisions.

  • Authorization cannot bind for the each auth handler. Currently the defined values for the scope attribute are applied for all the auth handlers plugged into the listener, service, or resource.

  • Need a way to identify from which auth scheme / provider, the authentication was success.

  • Need a mechanism to post engage auth providers for authentication with AWS, OAuth1.0a etc.

Configurations

  • The scope pattern attribute type defined with string[][], cannot define the following pattern. (a AND b) OR (c AND d).

  • Need the capability to enable/disable and set the array position of authn & authz filters separately. Add config to disable authz filter [1.2.x] ballerina-lang#22109

  • Need to provide better configurations for auth handler engagement when the position field is configured.
    If it is needed to engage filters in order filterA, authnFilter, filterB the config would be as follows. This is misleading.

listener http:Listener l = new (9090, {
        filters: [filterA, filterB],
        auth: {
            authHandlers: [jwtAuthHandler],
            position: 1,
            mandateSecureSocket: false
        }
}
@ldclakmal ldclakmal self-assigned this Mar 23, 2020
@ldclakmal ldclakmal transferred this issue from ballerina-platform/ballerina-lang Oct 23, 2020
@ldclakmal ldclakmal added the Verson/SwanLakeDump All issues planned for Swan Lake GA release label Dec 9, 2020
@ldclakmal ldclakmal added this to the Swan Lake - Alpha milestone Dec 9, 2020
@ldclakmal ldclakmal added the Area/Security Issues related to stdlib security label Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Security Issues related to stdlib security module/auth Type/Improvement Verson/SwanLakeDump All issues planned for Swan Lake GA release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant