No description
Find a file
2017-04-19 00:16:44 +02:00
ansible Continued working on Ansible playbook 2017-04-09 23:25:33 +02:00
app Detecting Debian SSO client certificates for login 2017-04-19 00:16:44 +02:00
bin Updated Rails version to 5.0.2 2017-04-16 23:59:05 +02:00
config Cruft removed 2017-04-19 00:15:49 +02:00
db Allow same email address with different SSO providers 2017-04-06 18:32:20 +02:00
doc Documentation updated 2017-04-09 21:21:22 +02:00
lib More relaxed blacklist for importing packages 2016-10-30 13:03:04 +01:00
log Blank rails 4.0 project started 2013-07-27 00:19:29 +02:00
public Added dummy image for broken files 2016-11-03 13:25:00 +01:00
test Fixed deprecation warnings 2017-04-17 00:02:23 +02:00
vendor/assets Removed vendor jQuery fancybox stylesheet - it's included in the Gem 2016-04-06 16:42:20 +02:00
.gitignore Ignoring Ruby installation 2016-08-10 08:44:54 +02:00
.ruby-version Increasing Ruby version to 2.4.1 2017-04-16 23:56:23 +02:00
config.ru Blank rails 4.0 project started 2013-07-27 00:19:29 +02:00
Gemfile Github SSO added 2017-04-19 00:15:29 +02:00
Gemfile.lock Github SSO added 2017-04-19 00:15:29 +02:00
Guardfile Removed "rails s" from Guardfile 2015-04-24 12:20:06 +02:00
Rakefile Blank rails 4.0 project started 2013-07-27 00:19:29 +02:00
README.developer.md Amazon SSO added 2017-04-17 13:11:44 +02:00

Authentication

The application uses omniauth to allow local authentication for moderators and adds OAuth authentication to connect to Google+, Github and other authentication providers.

Documentation on omniauth:

https://github.com/omniauth/omniauth/wiki/List-of-Strategies https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview

List of strategies:

https://github.com/omniauth/omniauth/wiki/List-of-Strategies

Google

The client ID for the debshots and the private key must be set as environment variables before running the application:

  • GOOGLE_CLIENT_ID=…
  • GOOGLE_CLIENT_SECRET=…

Amazon

The client ID for the debshots and the secret must be set as environment variables before running the application:

  • AMAZON_CLIENT_ID=…
  • AMAZON_CLIENT_SECRET=…

Client ID:

amzn1.application-oa2-client.78d832919fc24456b0636762cf18efd9

Client Secret:

8c495d0940ca4100313c03e93b8b4240eef256d2fdbe672718506f29f5a20f61

Available login buttons: https://login.amazon.com/button-guide

launchpad

Github

Caveats

The OAuth callback handling uses Ruby's "faraday" library. Unfortunately Faraday may easily miss the directory where the common CAs are stored. So the path to the certificates on the system needs to be provided:

config.omniauth :google_oauth2, '398593918966-0fpmit0pb6ptio1ndsie5dfcnqhei63l.apps.googleusercontent.com', 'uRQq_dLs1kx7l5sYIyEyPVRc', :client_options => {:ssl => {:ca_path => '/etc/ssl/certs'}}

For another explanation of the issue see: https://gist.github.com/kt103099/3183125