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

Make it easy to add new Authentication mechanisms and allow chaining them #348

Closed
Yannic92 opened this issue Mar 8, 2019 · 1 comment
Closed
Milestone

Comments

@Yannic92
Copy link
Contributor

Yannic92 commented Mar 8, 2019

Right now it is not possible to chain multiple authentication mechanisms that are all applicable to a given request.

Behaviour now: First applicable authentication mechanism is used and if authentication fails, the "chain" will be interrupted.

Desired behaviour: If we have multiple applicable authentication mechanisms all of them should be processed until either one of them authenticates successfully or all of them fail.

Example use case:

  • We implement for example two different authentication providers.
  • Both are getting their credentials from Basic Auth (both are applicable for a request sending an authorization type containing basic auth).
  • First try one of them and if this authentication fails we should try the other one
@thjaeckle thjaeckle added this to the 0.9.0-M1 milestone Mar 8, 2019
@thjaeckle thjaeckle removed this from the 0.9.0-M1 milestone Mar 27, 2019
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
* Refactor AuthenticationDirectives to AuthenticationProviders
* Use one single AuthenticationDirective
* Allow to chain authentication providers
** first successful authentication counts
* Moves AuthenticationProviders to security package instead of endpoint

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
… more stable

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…hain

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…sure they are running asnyc.

* It's already ensured in AuthenticationChain.
* Eliminates risk of dead lock (blocking dispatcher out of threads)

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…understand.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…c comments and code formatting. Do not check twice if AuthenticationChain is applicable.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…possible. Adjusted some Javadoc comments.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…nses sent within RootRoute.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…enable "failIfMissing" after having updated all copyright headers in files.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
* Refactor AuthenticationDirectives to AuthenticationProviders
* Use one single AuthenticationDirective
* Allow to chain authentication providers
** first successful authentication counts
* Moves AuthenticationProviders to security package instead of endpoint

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
… more stable

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…hain

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…sure they are running asnyc.

* It's already ensured in AuthenticationChain.
* Eliminates risk of dead lock (blocking dispatcher out of threads)

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…understand.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…c comments and code formatting. Do not check twice if AuthenticationChain is applicable.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…possible. Adjusted some Javadoc comments.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…possible. Adjusted some Javadoc comments.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…nses sent within RootRoute.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…enable "failIfMissing" after having updated all copyright headers in files.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
* Moves Entry to cache utils
* Moves AbstractPubSubListenerActor to cluster utils

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…tication-dispatcher

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…understand.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…c comments and code formatting. Do not check twice if AuthenticationChain is applicable.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…possible. Adjusted some Javadoc comments.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…nses sent within RootRoute.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 pushed a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…enable "failIfMissing" after having updated all copyright headers in files.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
* Moves Entry to cache utils
* Moves AbstractPubSubListenerActor to cluster utils

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
…tication-dispatcher

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
Yannic92 added a commit to bosch-io/ditto that referenced this issue Apr 9, 2019
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
@jufickel-b
Copy link

Fixed with PR #377.

@thjaeckle thjaeckle added this to the 0.9.0-M2 milestone Apr 9, 2019
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

No branches or pull requests

3 participants