Skip to content

Commit ce24e64

Browse files
authored
split okta tenant for business and admin work (#24)
1 parent 2ab2873 commit ce24e64

File tree

6 files changed

+56
-17
lines changed

6 files changed

+56
-17
lines changed

readme.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -785,18 +785,18 @@ Sample access_token. `org_id` is nullable for donors.
785785

786786
# Screenplays
787787

788-
| No | Screenplay | Video | Website | Demo Topic |
789-
|----|----------------------------------|----------------------------------|----------|--------------------------------|
790-
| 01 | [s-01.txt](./videos/01/s-01.txt) | [s-01.mp4](./videos/01/s-01.mp4) | Donor | Ideation |
791-
| 02 | [s-02.txt](./videos/02/s-02.txt) | [s-02.mp4](./videos/02/s-02.mp4) | Donor | Credential login, MyAccount |
792-
| 03 | [s-03.txt](./videos/03/s-03.txt) | [s-03.mp4](./videos/03/s-03.mp4) | Donor | Social login & account linking |
793-
| 04 | [s-04.txt](./videos/04/s-04.txt) | [s-04.mp4](./videos/04/s-04.mp4) | Business | Credential login & RBAC |
794-
| 05 | [s-05.txt](./videos/05/s-05.txt) | [s-05.mp4](./videos/05/s-05.mp4) | Business | Federation and HRD |
795-
| 06 | [s-06.txt](./videos/06/s-06.txt) | [s-06.mp4](./videos/06/s-06.mp4) | Business | SS-SSO, SCIM |
796-
| 07 | [s-07.txt](./videos/07/s-07.txt) | [s-07.mp4](./videos/07/s-07.mp4) | Both | RTL & ACL |
797-
| 08 | [s-08.txt](./videos/08/s-08.txt) | [s-08.mp4](./videos/08/s-08.mp4) | Donor | Bulk import & Forms |
798-
| 09 | [s-09.txt](./videos/09/s-09.txt) | [s-09.mp4](./videos/09/s-09.mp4) | Donor | MCD |
799-
| 10 | [s-10.txt](./videos/10/s-10.txt) | [s-10.mp4](./videos/10/s-10.mp4) | Donor | User events |
800-
| 11 | [s-11.txt](./videos/11/s-11.txt) | [s-11.mp4](./videos/11/s-11.mp4) | Business | Connected Account |
801-
| 12 | [s-12.txt](./videos/12/s-12.txt) | [s-12.mp4](./videos/12/s-12.mp4) | Business | CIBA |
802-
| 13 | [s-13.txt](./videos/13/s-13.txt) | [s-13.mp4](./videos/13/s-13.mp4) | Both | Closing thoughts |
788+
| No | Screenplay | Video | Website | Demo Topic |
789+
|----|----------------------------------|----------------------------------|----------|-----------------------------------|
790+
| 01 | [s-01.txt](./videos/01/s-01.txt) | [s-01.mp4](./videos/01/s-01.mp4) | Donor | Ideation |
791+
| 02 | [s-02.txt](./videos/02/s-02.txt) | [s-02.mp4](./videos/02/s-02.mp4) | Donor | Credential login, MyAccount |
792+
| 03 | [s-03.txt](./videos/03/s-03.txt) | [s-03.mp4](./videos/03/s-03.mp4) | Donor | Social login & account linking |
793+
| 04 | [s-04.txt](./videos/04/s-04.txt) | [s-04.mp4](./videos/04/s-04.mp4) | Business | Credential login & RBAC & Chiclet |
794+
| 05 | [s-05.txt](./videos/05/s-05.txt) | [s-05.mp4](./videos/05/s-05.mp4) | Business | Federation and HRD |
795+
| 06 | [s-06.txt](./videos/06/s-06.txt) | [s-06.mp4](./videos/06/s-06.mp4) | Business | SS-SSO, SCIM |
796+
| 07 | [s-07.txt](./videos/07/s-07.txt) | [s-07.mp4](./videos/07/s-07.mp4) | Both | RTL & ACL |
797+
| 08 | [s-08.txt](./videos/08/s-08.txt) | [s-08.mp4](./videos/08/s-08.mp4) | Donor | Bulk import & Forms |
798+
| 09 | [s-09.txt](./videos/09/s-09.txt) | [s-09.mp4](./videos/09/s-09.mp4) | Donor | MCD |
799+
| 10 | [s-10.txt](./videos/10/s-10.txt) | [s-10.mp4](./videos/10/s-10.mp4) | Donor | User events |
800+
| 11 | [s-11.txt](./videos/11/s-11.txt) | [s-11.mp4](./videos/11/s-11.mp4) | Business | Connected Account |
801+
| 12 | [s-12.txt](./videos/12/s-12.txt) | [s-12.mp4](./videos/12/s-12.mp4) | Business | CIBA |
802+
| 13 | [s-13.txt](./videos/13/s-13.txt) | [s-13.mp4](./videos/13/s-13.mp4) | Both | Closing thoughts |

tf/05-orgs-federate.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
## -- Okta --
22
resource "okta_app_signon_policy" "only_1fa" {
3+
provider = okta.business
34
name = "Replate Org 1FA policy"
45
description = "Authentication Policy to be used simple apps."
56
}
67

78
resource "okta_app_signon_policy_rule" "only_1fa_rule" {
9+
provider = okta.business
810
policy_id = okta_app_signon_policy.only_1fa.id
911
name = "Password only"
1012
factor_mode = "1FA"
@@ -23,12 +25,14 @@ resource "okta_app_signon_policy_rule" "only_1fa_rule" {
2325
# Okta Group for Federated Supplier employees
2426
# VISIT https://amin-admin.okta.com/admin/group/00g7583ngaQ9Nurc33l7
2527
resource "okta_group" "supplier_workforce" {
28+
provider = okta.business
2629
name = "Supplier Workforce"
2730
description = "Group for all Supplier workforce employees"
2831
}
2932

3033
# RWA Application for Auth0 integration
3134
resource "okta_app_oauth" "replate-rwa" {
35+
provider = okta.business
3236
label = "Replate Business Federation"
3337
type = "web"
3438
grant_types = ["authorization_code"]
@@ -46,6 +50,7 @@ resource "okta_app_oauth" "replate-rwa" {
4650
}
4751

4852
resource "okta_app_group_assignments" "replate-rwa-group-assignment" {
53+
provider = okta.business
4954
app_id = okta_app_oauth.replate-rwa.id
5055
group {
5156
id = okta_group.supplier_workforce.id
@@ -54,6 +59,7 @@ resource "okta_app_group_assignments" "replate-rwa-group-assignment" {
5459

5560
# Sample users for the workforce group
5661
resource "okta_user" "supplier-io_admin" {
62+
provider = okta.business
5763
first_name = "Adam"
5864
last_name = "Supplier"
5965
login = "admin@supplier.io"
@@ -63,6 +69,7 @@ resource "okta_user" "supplier-io_admin" {
6369
}
6470

6571
resource "okta_user" "supplier-io_member" {
72+
provider = okta.business
6673
first_name = "Maria"
6774
last_name = "Supplier"
6875
login = "member@supplier.io"
@@ -74,6 +81,7 @@ resource "okta_user" "supplier-io_member" {
7481

7582
# Assign users to the workforce group
7683
resource "okta_group_memberships" "supplier-io_members" {
84+
provider = okta.business
7785
group_id = okta_group.supplier_workforce.id
7886
users = [
7987
okta_user.supplier-io_admin.id,

tf/admin.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ resource "auth0_connection" "replate_workforce" {
9494
options {
9595
client_id = okta_app_oauth.auth0_rwa.client_id
9696
client_secret = okta_app_oauth.auth0_rwa.client_secret
97-
domain = "${var.okta_org_name}.${var.okta_base_url}"
97+
domain = "${var.okta_admin_org_name}.${var.okta_admin_base_url}"
9898

9999
# OIDC configuration
100100
#discovery_url = "https://${var.okta_org_name}.${var.okta_base_url}/.well-known/openid-configuration"

tf/providers.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,13 @@ provider "okta" {
3636
org_name = var.okta_org_name
3737
base_url = var.okta_base_url
3838
api_token = var.okta_tf_api_token
39+
alias = "business"
40+
}
41+
42+
provider "okta" {
43+
org_name = var.okta_admin_org_name
44+
base_url = var.okta_admin_base_url
45+
api_token = var.okta_admin_tf_api_token
46+
alias = "admin"
3947
}
4048

tf/replate-workforce.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Okta Group for Replate Workforce employees
22
resource "okta_group" "replate_workforce" {
3+
provider = okta.admin
34
name = "Replate Workforce"
45
description = "Group for all Replate workforce employees"
56
}
67

78
# RWA Application for Auth0 integration
89
resource "okta_app_oauth" "auth0_rwa" {
10+
provider = okta.admin
911
label = "Auth0 Workforce Federation"
1012
type = "web"
1113
grant_types = ["authorization_code"]
@@ -24,6 +26,7 @@ resource "okta_app_oauth" "auth0_rwa" {
2426
}
2527

2628
resource "okta_app_group_assignments" "auth0-rwa-group-assignment" {
29+
provider = okta.admin
2730
app_id = okta_app_oauth.auth0_rwa.id
2831
group {
2932
id = okta_group.replate_workforce.id
@@ -32,6 +35,7 @@ resource "okta_app_group_assignments" "auth0-rwa-group-assignment" {
3235

3336
# Sample users for the workforce group
3437
resource "okta_user" "workforce_user1" {
38+
provider = okta.admin
3539
first_name = "John"
3640
last_name = "Smith"
3741
login = "john.smith@replate.dev"
@@ -41,6 +45,7 @@ resource "okta_user" "workforce_user1" {
4145
}
4246

4347
resource "okta_user" "workforce_user2" {
48+
provider = okta.admin
4449
first_name = "Jane"
4550
last_name = "Doe"
4651
login = "jane.doe@replate.dev"
@@ -50,6 +55,7 @@ resource "okta_user" "workforce_user2" {
5055
}
5156
# Assign users to the workforce group
5257
resource "okta_group_memberships" "replate_workforce_members" {
58+
provider = okta.admin
5359
group_id = okta_group.replate_workforce.id
5460
users = [
5561
okta_user.workforce_user1.id,

tf/variables.tf

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ variable "cloudflare_d1_db_name" {
5757
default = "replate-crm"
5858
}
5959

60-
## okta
60+
## okta (for replate customers)
6161
variable "okta_org_name" {
6262
type = string
6363
description = "Okta org name"
@@ -81,6 +81,23 @@ variable "okta_base_url" {
8181
default = "okta.com"
8282
}
8383

84+
## Okta admin (for replate workforce team)
85+
variable "okta_admin_org_name" {
86+
type = string
87+
description = "Okta admin org name"
88+
}
89+
90+
variable "okta_admin_tf_api_token" {
91+
type = string
92+
description = "Okta Admin Terraform API token"
93+
sensitive = true
94+
}
95+
96+
variable "okta_admin_base_url" {
97+
type = string
98+
default = "okta.com"
99+
}
100+
84101
## LinkedIn Social
85102
variable "linkedin_client_id" {
86103
type = string

0 commit comments

Comments
 (0)