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

Add support for OAuth authentication #112

Open
akka-ci opened this issue Sep 8, 2016 · 14 comments
Open

Add support for OAuth authentication #112

akka-ci opened this issue Sep 8, 2016 · 14 comments
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted help wanted Identifies issues that the core team will likely not have time to work on nice-to-have (low-prio) Tasks which make sense, however are not very high priority, feel free to help out! t:client Issues related to the HTTP Client t:server Issues related to the HTTP server

Comments

@akka-ci
Copy link

akka-ci commented Sep 8, 2016

Issue by jrudolph
Wednesday Feb 11, 2015 at 13:59 GMT
Originally opened as akka/akka#16857


See spray/spray#1007 and the previous unmerged PR spray/spray#372.

/cc @sirthias

@akka-ci akka-ci added this to the 2.4.x milestone Sep 8, 2016
@akka-ci akka-ci added help wanted Identifies issues that the core team will likely not have time to work on nice-to-have (low-prio) Tasks which make sense, however are not very high priority, feel free to help out! t:http labels Sep 8, 2016
@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by michalkowol
Thursday Mar 19, 2015 at 12:20 GMT


+1

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by briantopping
Sunday Apr 26, 2015 at 10:58 GMT


+1 this would be spectacular!

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by cluda
Tuesday May 05, 2015 at 16:52 GMT


+1

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by briantopping
Friday Jun 05, 2015 at 18:43 GMT


I've been poking at this a little. It seems like https://github.com/akka/akka/blob/f71dfbaeccf08f08b8fcef3d1cfd46c6875c26a9/akka-http-core/src/main/java/akka/http/javadsl/model/headers/HttpCredentials.java#L26-28 might be a good idea in some regards and a bad idea in others. For instance, what about OAuth1? 1a? JWT? Where does the list end? What happens when someone wants Kerberos? Does Akka rev for that?

Apologies if this sounds too direct. I think it would be great if HTTP supported all this good stuff, just not sure if it's possible (there's always another protocol) and then how to best manage it when there is another one. I'm becoming a bigger fan of kerberized services by the day -- there's always a low-intensity password attack going on against my IMAP services, for instance -- but the model is quite a bit different than other authentication schemes.

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by jrudolph
Saturday Jun 06, 2015 at 06:57 GMT


My current take is to keep functionality as much out of akka-http as possible but provide reasonable infrastructure to make third-party addons simple. Concretely, I would rather accept parsers/renderers for well-known and well-spec'd headers (a cookie anyone?) than potentially security relevant code implementing semantics for an authentication scheme that needs to be maintained inside of akka.

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by briantopping
Saturday Jun 06, 2015 at 08:33 GMT


That's more or less what I was thinking, I just wonder if it might make more sense to have per-pool or per-connection transform hooks that security providers could loop in through. So for instance, once a security provider was specified for a connection, all requests over that connection would automatically use that provider.

For their part, providers might insert stream elements to indicate their actions and otherwise abstract the low level details. In doing so, Akka can stay out of the business of "well known headers" (where does the toolkit draw the line?) and leave them as CustomHeader. The app, knowing that the provider is inserting events, can pattern match against them when it needs to know.

Thoughts?

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by briantopping
Saturday Jun 06, 2015 at 10:04 GMT


Hmm, http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/stream-customize.html seems to indicate that a Stage can't generate multiple messages and I'm guessing it applies here. I do think it's a nice pattern though, that a configured provider (security or otherwise) can report context changes occurring in a pipeline by inserting messages in the stream like that.

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by drewhk
Sunday Jun 07, 2015 at 09:25 GMT


seems to indicate that a Stage can't generate multiple messages and I'm guessing it applies here

This is not true, the "Duplicator" example shows how to generate multiple messages. Most of the built-in Akka combinators use stages, see: https://github.com/akka/akka/blob/release-2.3-dev/akka-stream/src/main/scala/akka/stream/impl/fusing/Ops.scala

Or you meant something different?

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by briantopping
Sunday Jun 07, 2015 at 11:27 GMT


Thanks for the correction, I got distracted with the warning at the top of the page.

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by ktoso
Monday Apr 04, 2016 at 12:42 GMT


Linked as stretch goal of high level client, help here is certainly welcome as we won't work on it for now.

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by briantopping
Monday Apr 04, 2016 at 13:09 GMT


I built a PushPull that does it, works great. I had hoped to clean it up and submit it, just forgot since there's now a project out that contains some of this. Maybe could be closed on account of that project?

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by ktoso
Monday Apr 04, 2016 at 13:11 GMT


Which project specifically? OAuth is one of the few things that a bit more built-in support would be good to hare in Akka HTTP I think, as it's so "everywhere".

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by briantopping
Monday Apr 04, 2016 at 13:14 GMT


Yes agreed. It's 7am here, just laying in bed typing from phone. I'll look for it later and update accordingly. Maybe it makes sense to contribute what I have after all.

@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by ktoso
Tuesday Apr 05, 2016 at 00:36 GMT


Would be fun, thanks in advance!

@ktoso ktoso added 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted and removed t:http labels Sep 8, 2016
@ktoso ktoso removed this from the 2.4.x milestone Sep 12, 2016
@jrudolph jrudolph added t:client Issues related to the HTTP Client t:server Issues related to the HTTP server and removed t:client Issues related to the HTTP Client t:http:server labels Nov 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted help wanted Identifies issues that the core team will likely not have time to work on nice-to-have (low-prio) Tasks which make sense, however are not very high priority, feel free to help out! t:client Issues related to the HTTP Client t:server Issues related to the HTTP server
Projects
None yet
Development

No branches or pull requests

3 participants