Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upIntegrate an OAuth2 provider #27
Comments
tboerger
added
the
kind/enhancement
label
Nov 3, 2016
tboerger
added this to the 1.2.0 milestone
Nov 3, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Oh, sounds good this :) |
tboerger
added
kind/feature
and removed
kind/enhancement
labels
Nov 3, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bkcsoft
Nov 4, 2016
Member
Should this be integrated as "The" login-handler, or as an optional dependency? (i.e. build tag)
|
Should this be integrated as "The" login-handler, or as an optional dependency? (i.e. build tag) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tboerger
Nov 4, 2016
Member
I think we can always integrate it but add an option for admins to disable it
|
I think we can always integrate it but add an option for admins to disable it |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
No build tag but default is closed until admin open it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Nice idea |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pushed a commit
to gitlabhq/gitlabhq
that referenced
this issue
Dec 21, 2016
pushed a commit
to dreampet/gitlab
that referenced
this issue
Dec 22, 2016
lunny
modified the milestones:
1.3.0,
1.2.0
Apr 6, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
JohnTheodore
commented
May 2, 2017
|
+1, this would be awesome!!! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
femaref
commented
Jun 9, 2017
|
is there an ETA for this? Would make life easier. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
lafriks
Sep 4, 2017
Member
I think this one could be good option to integrate into gitea - https://github.com/coreos/dex
|
I think this one could be good option to integrate into gitea - https://github.com/coreos/dex |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@lafriks Looks good, but it requires go1.8 I think. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mikehaertl
Sep 5, 2017
Here's another Go based alternative: https://github.com/ory/hydra
ORY Hydra is not an identity provider (user sign up, user log in, password reset flow), but connects to your existing identity provider through a consent app.
It seems quite easy to set up. Here's a nice tutorial: https://www.ory.am/run-oauth2-server-open-source-api-security.html?
mikehaertl
commented
Sep 5, 2017
|
Here's another Go based alternative: https://github.com/ory/hydra
It seems quite easy to set up. Here's a nice tutorial: https://www.ory.am/run-oauth2-server-open-source-api-security.html? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
lafriks
Sep 5, 2017
Member
@mikehaertl Hydra does not support JWT and from what I understand even if added they won't be in community edition - https://ory.gitbooks.io/hydra/content/faq.html#is-jwt-supported
|
@mikehaertl Hydra does not support JWT and from what I understand even if added they won't be in community edition - https://ory.gitbooks.io/hydra/content/faq.html#is-jwt-supported |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
JWT is a must have for drone integration |
lunny
modified the milestones:
1.3.0,
1.x.x
Oct 10, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ts468
Dec 15, 2017
Remotely related, but would it also be possible to extend gitea so that gitea can listen on a second interface over which every access is granted automatically?
The idea is to allow tooling without OAuth2 authentication capabilities, like Hydra, to fetch data over, e.g., the loopback interface.
ts468
commented
Dec 15, 2017
|
Remotely related, but would it also be possible to extend gitea so that gitea can listen on a second interface over which every access is granted automatically? The idea is to allow tooling without OAuth2 authentication capabilities, like Hydra, to fetch data over, e.g., the loopback interface. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
JonasFranzDEV
Mar 11, 2018
Member
https://github.com/ory/fosite looks like a promising library to integrate this feature. It is used by hydra AFAIK.
|
https://github.com/ory/fosite looks like a promising library to integrate this feature. It is used by hydra AFAIK. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
IMHO https://github.com/coreos/dex looks more promising |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Migrating all existing users would be a PITA though |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
aaronpk
Jun 4, 2018
It would be fantastic if Gitea were its own OAuth2 provider! In fact, IndieAuth is the perfect candidate for how to implement this.
IndieAuth is an OAuth 2.0 extension, which avoids the centralized problems with existing OAuth solutions by using DNS for "registration" of client IDs and user IDs. Every user account is identified by a URL (for Gitea this could be your Gitea user page), and client IDs are also URLs (would be the Gitea instance home page in this case.)
This would let people sign in to other Gitea instances without any sort of prior relationship or doing client registration and such. Happy to walk through this in more detail if you're interested!
(originally posted at https://aaronparecki.com/2018/06/04/12/gitea-indieauth)
aaronpk
commented
Jun 4, 2018
•
|
It would be fantastic if Gitea were its own OAuth2 provider! In fact, IndieAuth is the perfect candidate for how to implement this. IndieAuth is an OAuth 2.0 extension, which avoids the centralized problems with existing OAuth solutions by using DNS for "registration" of client IDs and user IDs. Every user account is identified by a URL (for Gitea this could be your Gitea user page), and client IDs are also URLs (would be the Gitea instance home page in this case.) This would let people sign in to other Gitea instances without any sort of prior relationship or doing client registration and such. Happy to walk through this in more detail if you're interested! (originally posted at https://aaronparecki.com/2018/06/04/12/gitea-indieauth) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Sounds like it's comparable with openid connect. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
aaronpk
Jun 4, 2018
Not quite, since OpenID Connect still requires registering clients to get client credentials to use with the flows. There is a dynamic client registration part of OpenID Connect, but this allows you to entirely bypass the need for registering clients separately since we just piggyback on the existing DNS for identifying clients.
(originally posted at https://aaronparecki.com/2018/06/04/18/)
aaronpk
commented
Jun 4, 2018
•
|
Not quite, since OpenID Connect still requires registering clients to get client credentials to use with the flows. There is a dynamic client registration part of OpenID Connect, but this allows you to entirely bypass the need for registering clients separately since we just piggyback on the existing DNS for identifying clients. (originally posted at https://aaronparecki.com/2018/06/04/18/) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ekozan
Jun 14, 2018
I'll make an PRs for this one if nobody work on it
- 1 : Add OIDC lib and API
- 2 : Add Application managment
- 3 : Add Oauth HTTP HANDLER
ekozan
commented
Jun 14, 2018
•
|
I'll make an PRs for this one if nobody work on it
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@ekozan Mind linking to "OIDC" since I have no clue what that is |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I think OIDC == OpenID Connect |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ekozan
Jun 15, 2018
@bkcsoft :D sorry openid Connect : http://openid.net/connect/
It's like openid3 based on oauth2
but i have dig more and i'll stick to Oauth2 for the moment
Because all big ( Gitlab, Github, etc... ) use Oauth
ekozan
commented
Jun 15, 2018
•
|
@bkcsoft :D sorry openid Connect : http://openid.net/connect/ It's like openid3 based on oauth2 but i have dig more and i'll stick to Oauth2 for the moment Because all big ( Gitlab, Github, etc... ) use Oauth |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ekozan
commented
Jun 17, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tarelda
Jun 25, 2018
Contributor
IMHO, integrate OAuth2 endpoints with maintained external lib (no point in reinventing the wheel) into API. Maybe even strip out code generation from authentication code flow and force only global/org scope. At least this would work for tools like Drone, registry etc.
|
IMHO, integrate OAuth2 endpoints with maintained external lib (no point in reinventing the wheel) into API. Maybe even strip out code generation from authentication code flow and force only global/org scope. At least this would work for tools like Drone, registry etc. |
tarelda
referenced this issue
Jun 26, 2018
Open
api/v1/users/[:user]/tokens is too special. Make it less special? #4315
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@ekozan just like github, I think. :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ekozan
Jun 26, 2018
@tarelda Oauth2 is realy simple protocol integrate an external library is just pointless, and many required library is already present in Gitea - 60% of the oauth or OIDC provider is the UI :)
I'll make the PR next week i had no time for finish the UI this week
ekozan
commented
Jun 26, 2018
•
|
@tarelda Oauth2 is realy simple protocol integrate an external library is just pointless, and many required library is already present in Gitea - 60% of the oauth or OIDC provider is the UI :) I'll make the PR next week i had no time for finish the UI this week |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
JonasFranzDEV
Jun 30, 2018
Member
@ekozan You can create a seperate PR for the UI, this may improve the review speed.
|
@ekozan You can create a seperate PR for the UI, this may improve the review speed. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vtolstov
Aug 13, 2018
so, what library decided to use? i don't find any pr about oauth2 server in gitea
vtolstov
commented
Aug 13, 2018
|
so, what library decided to use? i don't find any pr about oauth2 server in gitea |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
xdevs23
commented
Aug 13, 2018
|
I'm waiting for this one as well. Definitely looking forward to it! |
go-gitea
deleted a comment from
cutec-chris
Aug 19, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
JohnTheodore
Aug 22, 2018
Is there a branch or PR related to this change? or we're still in the discussion phase.
JohnTheodore
commented
Aug 22, 2018
|
Is there a branch or PR related to this change? or we're still in the discussion phase. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@JohnTheodore no people are working on this. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
xdevs23
commented
Aug 23, 2018
|
That's unfortunate |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
JohnTheodore
commented
Aug 24, 2018
|
@ekozan mentioned a PR, I wasn't sure if that happened. |
tboerger commentedNov 3, 2016
•
edited
Edited 1 time
-
tboerger
edited Mar 16, 2017 (most recent)
To make it easier for other applications to hook into Gitea we should integrate an OAuth2 provider, that way tools like Drone CI can authenticate against Gitea much easier. A good library for that can be https://github.com/RangelReale/osin.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.