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

OAuth GitHub support #320

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

dpordomingo
Copy link
Contributor

@dpordomingo dpordomingo commented Nov 7, 2019

required by https://github.com/src-d/applications-backlog/issues/4
depends on #319 #316

This PR adds support for GitHub OAuth log-in, as it was done by #308, which added support for Google OAuth log-in. Now, both login methods can coexist.

This PR does not handle the GitHub user, which should be done in another PR.

See docs of usage on src-d/sourced-ce#265

You can enable GitHub and Google OAuth providers running:

$ export OAUTH_ENABLED_PROVIDERS=github,google
$ export OAUTH_REGISTRATION_ROLE=Gamma
$ OAUTH_GOOGLE_CONSUMER_KEY=<google client_id> \
  OAUTH_GOOGLE_CONSUMER_SECRET=<google client_secret> \
  OAUTH_GITHUB_CONSUMER_KEY=<github client_id> \
  OAUTH_GITHUB_CONSUMER_SECRET=<github client_secret> \
  sourced init local .

which will enable this sign-in form:


  • I have updated the CHANGELOG file according to the conventions in keepachangelog.com
  • This PR contains changes that do not require a mention in the CHANGELOG file

dpordomingo and others added 8 commits November 6, 2019 06:58
Since celery in dev mode is replaced by 'tianon/true', which exit fast,
the restart policy should be "no" in order to avoid entering in a restart loop.

The "no" needs to be escaped because it must be a "string", and the quotes (")
would be removed by 'awk' when processing the 'docker-compose.override.yml' template.

Signed-off-by: David Pordomingo <[email protected]>
Handle create, modify, move, rename and delete events.

Signed-off-by: David Pordomingo <[email protected]>
It copies the modified 'docker-compose.override.yml' into
'~/.sourced/compose-files/__active__/docker-compose.override.yml'

Signed-off-by: David Pordomingo <[email protected]>
Some files could be owned by 'root' inside of /home/superset
(due to mounted volumes, caches...)
All files inside of '/home/superset' should be owned by 'superset'

Signed-off-by: David Pordomingo <[email protected]>
webpack-dev-server checks host headers and rejects the request
that comes from elsewhere.
When running source{d} from a dev env, it use to be accessed
from a regular domain, pointing to localhost, which would
trigger Webpack host check unless it runs with --disable-host-check

Signed-off-by: David Pordomingo <[email protected]>
Google and GiHub OAuth providers can be used independently
or simultaneously when authenticating in sourced-ui.
The order of the providers to use will be defined by 'OAUTH_ENABLED_PROVIDERS'

Signed-off-by: David Pordomingo <[email protected]>
@dpordomingo dpordomingo added the enhancement New feature or request label Nov 7, 2019
@dpordomingo dpordomingo requested a review from a team November 7, 2019 21:09
@dpordomingo dpordomingo self-assigned this Nov 7, 2019
@dpordomingo dpordomingo changed the title Oauth GitHub OAuth GitHub support Nov 7, 2019
@dpordomingo
Copy link
Contributor Author

@se7entyse7en I'm a newbie with Python (this is actually my first lines on Python), so I assume it is not real Python style, so feel free to suggest whatever should be addressed in that topic.

Signed-off-by: David Pordomingo <[email protected]>
Copy link

@alexpdp7 alexpdp7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can only review properly d4493ac , but that looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants