curationexperts / mahonia

Oregon Health & Science Repository
Apache License 2.0
6 stars 0 forks source link

SSO: Add Shibboleth Authentication to OSHU Environments #19

Open mark-dce opened 7 years ago

mark-dce commented 7 years ago

ACCETPANCE CRITERIA

banerjek commented 6 years ago

Instructions for OHSU at https://github.com/curationexperts/ohsu-cm return 404 error (referenced from https://github.com/curationexperts/mahonia/wiki/Shibboleth-Authentication)

banerjek commented 6 years ago

We're getting attributes from OHSU Shibb, but app still not letting us in. Not sure where things are breaking:

D, [2018-02-16T13:51:58.239125 #7300] DEBUG -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] OmniauthCallbacksController#shibboleth: request.env['omniauth.auth']: #<OmniAuth::AuthHash credentials=# extra=#<OmniAuth::AuthHash raw_info=#> info=# provider="shibboleth" uid="banerjek@ohsu.edu"> D, [2018-02-16T13:51:58.239225 #7300] DEBUG -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] auth = #<OmniAuth::AuthHash credentials=# extra=#<OmniAuth::AuthHash raw_info=#> info=# provider="shibboleth" uid="banerjek@ohsu.edu"> D, [2018-02-16T13:51:58.240756 #7300] DEBUG -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] ^[[1m^[[36mUser Load (0.5ms)^[[0m ^[[1m^[[34mSELECT "users".* FROM "users" WHERE "users"."provider" = $1 AND "users"."uid" = $2 ORDER BY "users"."id" ASC LIMIT $3^[[0m [["provider", "shibboleth"], ["uid", "banerjek@ohsu.edu"], ["LIMIT", 1]] D, [2018-02-16T13:51:58.241593 #7300] DEBUG -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] ^[[1m^[[35m (0.1ms)^[[0m ^[[1m^[[35mBEGIN^[[0m D, [2018-02-16T13:51:58.243931 #7300] DEBUG -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] ^[[1m^[[35mSQL (0.7ms)^[[0m ^[[1m^[[32mINSERT INTO "users" ("created_at", "updated_at", "provider", "uid") VALUES ($1, $2, $3, $4) RETURNING "id"^[[0m [["created_at", "2018-02-16 21:51:58.242288"], ["updated_at", "2018-02-16 21:51:58.242288"], ["provider", "shibboleth"], ["uid", "banerjek@ohsu.edu"]] D, [2018-02-16T13:51:58.244179 #7300] DEBUG -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] ^[[1m^[[35m (0.1ms)^[[0m ^[[1m^[[31mROLLBACK^[[0m I, [2018-02-16T13:51:58.244478 #7300] INFO -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] Completed 401 Unauthorized in 6ms (ActiveRecord: 1.4ms) F, [2018-02-16T13:51:58.245491 #7300] FATAL -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] F, [2018-02-16T13:51:58.245553 #7300] FATAL -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_users_on_email" DETAIL: Key (email)=() already exists. : INSERT INTO "users" ("created_at", "updated_at", "provider", "uid") VALUES ($1, $2, $3, $4) RETURNING "id"): F, [2018-02-16T13:51:58.245581 #7300] FATAL -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] F, [2018-02-16T13:51:58.245607 #7300] FATAL -- : [f8c0d27d-b8b2-411d-ad35-e18c613f493e] app/models/user.rb:48:in `from_omniauth'