oauth2-proxy/pkg
Mathieu Lecarme d67d6e3152
Add authorization support for Gitlab projects (#630)
* Add support for gitlab projets

* Add group membership in state

* Use prefixed allowed groups everywhere

* Fix: remove unused function

* Fix: rename func that add data to session

* Simplify projects and groups session funcs

* Add project access level for gitlab projects

* Fix: default access level

* Add per project access level

* Add user email when missing access level

* Fix: harmonize errors

* Update docs and flags description for gitlab project

* Add test with both projects and groups

* Fix: log error message

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>

* Fix: make doc a markdown link

* Add notes about read_api scope for projects

* Fix: Verifier override in Gitlab Provider

This commit fixes a bug caused by an override of the Verifier value from *ProviderData inside GitlabProvider struct

* Fix: ensure data in session before using it

* Update providers/gitlab.go

Co-authored-by: Nick Meves <nick.meves@greenhouse.io>

* Rename gitlab project initializer

* Improve return value readbility

* Use splitN

* Handle space delimiters in set project scope

* Reword comment for AddProjects

* Fix: typo

* Rework error handling in addProjectsToSession

* Reduce branching complexity in addProjectsToSession

* Fix: line returns

* Better comment for addProjectsToSession

* Fix: enrich session comment

* Fix: email domains is handled before provider mechanism

* Add archived project unit test

* Fix: emails handling in gitlab provider

Co-authored-by: Wilfried OLLIVIER <wollivier@bearstech.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
Co-authored-by: Nick Meves <nick.meves@greenhouse.io>
2020-12-05 10:57:33 -08:00
..
apis Add authorization support for Gitlab projects (#630) 2020-12-05 10:57:33 -08:00
authentication/basic Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
cookies Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
encryption Stop accepting legacy SHA1 signed cookies 2020-09-24 10:31:34 -07:00
header SecretSource.Value should be plain text in memory 2020-12-01 08:56:46 +00:00
ip Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
logger Fix log calldepth 2020-11-15 18:52:59 +00:00
middleware Remove failed bearer tokens from logs 2020-11-28 10:25:12 -08:00
requests Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
sessions Remove v5 JSON session support 2020-11-08 08:52:55 -08:00
upstream Add DefaultUpstreamFlushInterval to replace magic time.Second value 2020-11-19 10:39:21 +00:00
util Use X-Forwarded-Host consistently 2020-08-31 08:31:45 -07:00
validation Add authorization support for Gitlab projects (#630) 2020-12-05 10:57:33 -08:00