Skip to content

Commit 091adf2

Browse files
chore: rename org_url into org_domain
1 parent 88a5a3c commit 091adf2

20 files changed

Lines changed: 187 additions & 115 deletions

File tree

docs/user-guide/providers/okta/authentication.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Prowler sends DPoP (Demonstrating Proof of Possession) proofs on every token req
111111
Private key material **must** be supplied via environment variables — Prowler does not accept secrets through CLI flags.
112112

113113
```bash
114-
export OKTA_ORG_URL="https://YOUR-ORG.okta.com"
114+
export OKTA_ORG_DOMAIN="YOUR-ORG.okta.com"
115115
export OKTA_CLIENT_ID="0oa1234567890abcdef"
116116

117117
# Either of the two — content takes precedence over file when both are set.
@@ -131,7 +131,7 @@ Non-secret values are also available as CLI flags for ergonomic overrides:
131131

132132
| Flag | Equivalent env var |
133133
|---|---|
134-
| `--okta-org-url` | `OKTA_ORG_URL` |
134+
| `--okta-org-domain` | `OKTA_ORG_DOMAIN` |
135135
| `--okta-client-id` | `OKTA_CLIENT_ID` |
136136
| `--okta-scopes` | `OKTA_SCOPES` |
137137

@@ -143,9 +143,9 @@ poetry run python prowler-cli.py okta --check signon_global_session_idle_timeout
143143

144144
## Troubleshooting
145145

146-
### `OktaInvalidOrgURLError`
146+
### `OktaInvalidOrgDomainError`
147147

148-
The org URL must be `https://<org>.okta.com` (or `oktapreview.com` / `okta-emea.com` / a custom domain), with no trailing slash and an `https://` scheme.
148+
The org domain must be `<org>.okta.com` (or `.oktapreview.com` / `.okta-emea.com` / `.okta-gov.com`). Pass the bare hostname only — no `https://` scheme, no path, no trailing slash. Custom (vanity) domains are not currently accepted.
149149

150150
### `OktaPrivateKeyFileError`
151151

docs/user-guide/providers/okta/getting-started-okta.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ In **Admin assignments** for the service app, assign the built-in **Read-Only Ad
5959
Set the following environment variables. Using env vars is preferred over passing the values on the CLI.
6060

6161
```bash
62-
export OKTA_ORG_URL="https://acme.okta.com"
62+
export OKTA_ORG_DOMAIN="acme.okta.com"
6363
export OKTA_CLIENT_ID="0oa1234567890abcdef"
6464
export OKTA_PRIVATE_KEY_FILE="/secure/path/to/prowler-okta.pem"
6565
# Optional — defaults to "okta.policies.read"
@@ -73,7 +73,7 @@ The private key file may contain either a PEM-encoded RSA key or a JWK JSON docu
7373
For automated environments where writing the key to disk is not desirable (Prowler App, CI runners, container secrets, etc.), the private key may be passed directly as a string:
7474

7575
```bash
76-
export OKTA_ORG_URL="https://acme.okta.com"
76+
export OKTA_ORG_DOMAIN="acme.okta.com"
7777
export OKTA_CLIENT_ID="0oa1234567890abcdef"
7878
export OKTA_PRIVATE_KEY="$(cat /secure/path/to/prowler-okta.pem)"
7979
```
@@ -127,7 +127,7 @@ As new services and checks land in the Okta provider, the default scope list gro
127127

128128
### Common Errors
129129

130-
- **`OktaInvalidOrgURLError`** — the org URL must be `https://<org>.okta.com` (or `oktapreview.com` / `okta-emea.com`) with no trailing slash.
130+
- **`OktaInvalidOrgDomainError`** — the org domain must be `<org>.okta.com` (or `.oktapreview.com` / `.okta-emea.com` / `.okta-gov.com`). Pass the bare hostname only — no `https://` scheme, no path, no trailing slash.
131131
- **`OktaPrivateKeyFileError`** — confirm the file is readable and contains a non-empty PEM or JWK body.
132132
- **`OktaInsufficientPermissionsError`** — the credential probe reached Okta but the service app cannot perform the request. The error string carries `invalid_scope`, `Forbidden`, `not authorized`, or `permission`. Fix by granting the missing `okta.*.read` scope from **Okta API Scopes** and confirming the **Read-Only Administrator** role is assigned to the service app.
133133
- **`OktaInvalidCredentialsError`** — the credential probe reached Okta but Okta rejected the JWT. Typically the private key on disk does not match the public JWK uploaded to the service app, or the JWT signing parameters are wrong. Regenerate the keypair and re-upload the public JWK.

prowler/config/okta_mutelist_example.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
### Account, Check and/or Region can be * to apply for all the cases.
2-
### Account == <Okta organization URL, e.g. https://acme.okta.com>
2+
### Account == <Okta organization domain, e.g. acme.okta.com>
3+
### Bare domain only — no scheme, no path, no trailing slash.
4+
### Region is always "*" — Okta has no regional concept.
5+
### Resources matches against the policy name (e.g. "Default Policy"), not the id.
36
### Resources and tags are lists that can have either Regex or Keywords.
47
### Tags is an optional list that matches on tuples of 'key=value' and are "ANDed" together.
58
### Use an alternation Regex to match one of multiple tags with "ORed" logic.
69
### For each check you can except Accounts, Regions, Resources and/or Tags.
710
########################### MUTELIST EXAMPLE ###########################
811
Mutelist:
912
Accounts:
10-
"https://acme.okta.com":
13+
"acme.okta.com":
1114
Checks:
1215
"signon_global_session_idle_timeout_15min":
1316
Regions:

prowler/lib/check/check.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,9 @@ def execute(
746746
global_provider.identity.tenancy_id
747747
)
748748
elif global_provider.type == "okta":
749-
is_finding_muted_args["org_url"] = global_provider.identity.org_url
749+
is_finding_muted_args["org_domain"] = (
750+
global_provider.identity.org_domain
751+
)
750752
for finding in check_findings:
751753
if global_provider.type == "cloudflare":
752754
is_finding_muted_args["account_id"] = finding.account_id

prowler/lib/check/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ class CheckReportOkta(Check_Report):
939939

940940
resource_name: str
941941
resource_id: str
942-
org_url: str
942+
org_domain: str
943943
region: str
944944

945945
def __init__(
@@ -948,7 +948,7 @@ def __init__(
948948
resource: Any,
949949
resource_name: str = None,
950950
resource_id: str = None,
951-
org_url: str = None,
951+
org_domain: str = None,
952952
region: str = "global",
953953
) -> None:
954954
"""Initialize the Okta Check's finding information.
@@ -958,13 +958,13 @@ def __init__(
958958
resource: Basic information about the resource.
959959
resource_name: The name of the resource related with the finding.
960960
resource_id: The id of the resource related with the finding.
961-
org_url: The Okta organization URL related with the finding.
961+
org_domain: The Okta organization domain related with the finding.
962962
region: Always "global" — Okta has no regional concept.
963963
"""
964964
super().__init__(metadata, resource)
965965
self.resource_name = resource_name or getattr(resource, "name", "")
966966
self.resource_id = resource_id or getattr(resource, "id", "")
967-
self.org_url = org_url or getattr(resource, "org_url", "")
967+
self.org_domain = org_domain or getattr(resource, "org_domain", "")
968968
self.region = region
969969

970970

prowler/lib/outputs/finding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,10 @@ def generate_output(
428428
elif provider.type == "okta":
429429
output_data["auth_method"] = provider.auth_method
430430
output_data["account_uid"] = get_nested_attribute(
431-
provider, "identity.org_url"
431+
provider, "identity.org_domain"
432432
)
433433
output_data["account_name"] = get_nested_attribute(
434-
provider, "identity.org_url"
434+
provider, "identity.org_domain"
435435
)
436436
output_data["account_organization_uid"] = get_nested_attribute(
437437
provider, "identity.client_id"

prowler/lib/outputs/summary_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def display_summary_table(
110110
audited_entities = provider.identity.username or "Personal Account"
111111
elif provider.type == "okta":
112112
entity_type = "Okta Org"
113-
audited_entities = provider.identity.org_url
113+
audited_entities = provider.identity.org_domain
114114

115115
# Check if there are findings and that they are not all MANUAL
116116
if findings and not all(finding.status == "MANUAL" for finding in findings):

prowler/providers/common/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def init_global_provider(arguments: Namespace) -> None:
405405
)
406406
elif "okta" in provider_class_name.lower():
407407
provider_class(
408-
okta_org_url=getattr(arguments, "okta_org_url", ""),
408+
okta_org_domain=getattr(arguments, "okta_org_domain", ""),
409409
okta_client_id=getattr(arguments, "okta_client_id", ""),
410410
okta_private_key=getattr(arguments, "okta_private_key", ""),
411411
okta_private_key_file=getattr(

prowler/providers/okta/exceptions/exceptions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class OktaBaseException(ProwlerException):
2222
"message": "Okta credentials are not valid",
2323
"remediation": "Check the client ID and private key for the Okta service app.",
2424
},
25-
(14004, "OktaInvalidOrgURLError"): {
26-
"message": "Okta organization URL is not valid",
27-
"remediation": "Provide an org URL in the form https://<org>.okta.com (no trailing slash).",
25+
(14004, "OktaInvalidOrgDomainError"): {
26+
"message": "Okta organization domain is not valid",
27+
"remediation": "Provide an Okta-managed domain such as <org>.okta.com (or .oktapreview.com / .okta-emea.com / .okta-gov.com), with no scheme and no trailing slash.",
2828
},
2929
(14005, "OktaPrivateKeyFileError"): {
3030
"message": "Okta private key file could not be read",
@@ -85,7 +85,7 @@ def __init__(self, file=None, original_exception=None, message=None):
8585
)
8686

8787

88-
class OktaInvalidOrgURLError(OktaCredentialsError):
88+
class OktaInvalidOrgDomainError(OktaCredentialsError):
8989
def __init__(self, file=None, original_exception=None, message=None):
9090
super().__init__(
9191
14004, file=file, original_exception=original_exception, message=message

prowler/providers/okta/lib/arguments/arguments.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ def init_parser(self):
1212
)
1313
okta_auth_subparser = okta_parser.add_argument_group("Authentication")
1414
okta_auth_subparser.add_argument(
15-
"--okta-org-url",
15+
"--okta-org-domain",
1616
nargs="?",
17-
help="Okta organization URL (e.g. https://acme.okta.com)",
17+
help=(
18+
"Okta organization domain (e.g. acme.okta.com). Must be an "
19+
"Okta-managed domain (.okta.com / .oktapreview.com / "
20+
".okta-emea.com / .okta-gov.com), without scheme or path."
21+
),
1822
default=None,
19-
metavar="OKTA_ORG_URL",
23+
metavar="OKTA_ORG_DOMAIN",
2024
)
2125
okta_auth_subparser.add_argument(
2226
"--okta-client-id",

0 commit comments

Comments
 (0)