Skip to content

Commit

Permalink
Allow user to specify a customized IDP. (#26)
Browse files Browse the repository at this point in the history
Signed-off-by: QiFanIress <[email protected]>
  • Loading branch information
Qi Fan authored Nov 30, 2021
1 parent 57af25c commit 863ec52
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ function genericOktaConfiguration() {
config.AUTH_REQUEST.response_type = 'code';
config.AUTH_REQUEST.scope = '${scope}';
config.AUTH_REQUEST.redirect_uri = 'https://${domain-name}${callback-path}';
config.AUTH_REQUEST.idp = '${idp}';

config.TOKEN_REQUEST.client_id = '${client-id}';
config.TOKEN_REQUEST.redirect_uri = 'https://${domain-name}${callback-path}';
Expand Down
7 changes: 7 additions & 0 deletions infra/terraform/modules/okta_native/parameters.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,10 @@ resource "aws_ssm_parameter" "scope" {
value = var.scope
tags = var.tags
}

resource "aws_ssm_parameter" "idp" {
name = "/${var.name}/idp"
type = "String"
value = var.idp
tags = var.tags
}
6 changes: 6 additions & 0 deletions infra/terraform/modules/okta_native/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ variable "kms_key_arn" {
type = string
default = null
}

variable "idp" {
description = "Identity provider to use if there's no Okta Session"
type = string
default = ""
}
3 changes: 2 additions & 1 deletion mocha/custom-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"client_id": "abcdefghijklmnopqrst",
"response_type": "code",
"scope": "openid email",
"redirect_uri": "http://my-website.com/_callback"
"redirect_uri": "http://my-website.com/_callback",
"idp": "abcdefghijklmnopqrst"
},
"TOKEN_REQUEST": {
"client_id": "0oa1imdxt88mdVZabcdefghijklmnopqrstod0h8",
Expand Down
5 changes: 3 additions & 2 deletions mocha/generic-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"AUTH_REQUEST": {
"client_id": "${client-id}",
"response_type": "code",
"scope": "openid email",
"redirect_uri": "https://${domain-name}${callback-path}"
"scope": "${scope}",
"redirect_uri": "https://${domain-name}${callback-path}",
"idp": "${idp}"
},
"TOKEN_REQUEST": {
"client_id": "${client-id}",
Expand Down

0 comments on commit 863ec52

Please sign in to comment.