feat: Add OIDC authentication (#3314)

* feat: Add OIDC authentication

* Extract username into a separate package and add OIDC tests

* Add test case for invalid tokens

* Add test case for username as email

* Add OIDC to the frontend

* Improve comments from self-review

* Add authentication docs

* Add telemetry

* Update docs/install/auth.md

Co-authored-by: Ammar Bandukwala <ammar@ammar.io>

* Update docs/install/auth.md

Co-authored-by: Ammar Bandukwala <ammar@ammar.io>

* Remove username package

Co-authored-by: Ammar Bandukwala <ammar@ammar.io>
This commit is contained in:
Kyle Carberry
2022-07-31 23:05:35 -05:00
committed by GitHub
co-authored by Ammar Bandukwala
parent 8b17bf98ea
commit 3d0febdd90
28 changed files with 733 additions and 137 deletions
+2 -1
View File
@@ -27,7 +27,8 @@ CREATE TYPE log_source AS ENUM (
CREATE TYPE login_type AS ENUM (
'password',
'github'
'github',
'oidc'
);
CREATE TYPE parameter_destination_scheme AS ENUM (
+5
View File
@@ -31,6 +31,11 @@ func main() {
}
cmd := exec.Command(
"docker",
"run",
"--rm",
"--network=host",
"postgres:13",
"pg_dump",
"--schema-only",
connection,
@@ -0,0 +1,7 @@
CREATE TYPE old_login_type AS ENUM (
'password',
'github'
);
ALTER TABLE api_keys ALTER COLUMN login_type TYPE old_login_type USING (login_type::text::old_login_type);
DROP TYPE login_type;
ALTER TYPE old_login_type RENAME TO login_type;
@@ -0,0 +1,8 @@
CREATE TYPE new_login_type AS ENUM (
'password',
'github',
'oidc'
);
ALTER TABLE api_keys ALTER COLUMN login_type TYPE new_login_type USING (login_type::text::new_login_type);
DROP TYPE login_type;
ALTER TYPE new_login_type RENAME TO login_type;
+1
View File
@@ -101,6 +101,7 @@ type LoginType string
const (
LoginTypePassword LoginType = "password"
LoginTypeGithub LoginType = "github"
LoginTypeOIDC LoginType = "oidc"
)
func (e *LoginType) Scan(src interface{}) error {