Skip to content

Commit 33d18fb

Browse files
committed
add zod
1 parent 66a64f0 commit 33d18fb

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

clients/admin-ui/src/features/config-wizard/AuthenticateOktaForm.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,21 @@ const ValidationSchema = Yup.object().shape({
7373
.required()
7474
.trim()
7575
.label("Scopes")
76-
.default("okta.apps.read"),
76+
.default("okta.apps.read")
77+
.test(
78+
"valid-scopes",
79+
"Scopes must be a single scope or comma-separated list (e.g., 'okta.apps.read' or 'okta.apps.read, okta.users.read')",
80+
(value) => {
81+
if (!value) {
82+
return true;
83+
}
84+
// Split on comma and check each scope is non-empty and has no internal whitespace
85+
const scopes = value.split(",").map((s) => s.trim());
86+
return scopes.every(
87+
(scope) => scope.length > 0 && !/\s/.test(scope),
88+
);
89+
},
90+
),
7791
});
7892

7993
const AuthenticateOktaForm = () => {

clients/admin-ui/src/features/integrations/integration-type-info/oktaInfo.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export const OKTA_DESCRIPTION = (
2121
</>
2222
);
2323

24-
/** Full authentication description for Okta OAuth2 setup */
2524
export const OKTA_AUTH_DESCRIPTION =
2625
"Okta integration uses OAuth2 Client Credentials with private_key_jwt for secure authentication. You will need to generate an RSA key in Okta and copy the JSON key to use in Fides.";
2726

src/fides/cli/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def handle_okta_credentials_options(
327327
"Illegal usage: org-url/client-id/private-key and credentials-id cannot be used together"
328328
)
329329
okta_config = OktaConfig(
330-
orgUrl=org_url, clientId=client_id, privateKey=private_key
330+
org_url=org_url, client_id=client_id, private_key=private_key
331331
)
332332
if credentials_id:
333333
okta_config = get_config_okta_credentials(

0 commit comments

Comments
 (0)