Skip to content

Commit 9d28259

Browse files
authored
Merge pull request #74184 from jneczypor/OSDOCS-9954
/lgtm, merging OSDOCS-9954: oc (CLI) needs to be functional or fail gracefully without oauth server
2 parents 0cc3ced + 8722ad0 commit 9d28259

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

modules/oc-by-example-content.adoc

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1856,11 +1856,40 @@ Log in to a server
18561856
# Log in to the given server through a browser
18571857
oc login localhost:8443 --web --callback-port 8280
18581858
1859+
ifdef::openshift-dedicated,openshift-rosa[]
18591860
# Log in to the external OIDC issuer through Auth Code + PKCE by starting a local server listening port 8080
1860-
oc login localhost:8443 --exec-plugin=oc-oidc --client-id=client-id --extra-scopes=email,profile --callback-port=8080
1861+
oc login --exec-plugin=oc-oidc --issuer-url=<issuer_url> --client-id=<client_id> --extra-scopes=email,profile --callback-port=8080
1862+
1863+
# Log in with an external OIDC if the external OIDC certificate is not publically trusted
1864+
oc login --exec-plugin=oc-oidc --issuer-url=<issuer_url> --client-id=<client_id> --extra-scopes=email --callback-port=8080 --oidc-certificate-authority <CA for external OIDC certificate>
1865+
endif::openshift-dedicated,openshift-rosa[]
18611866
----
18621867

1868+
ifdef::openshift-dedicated,openshift-rosa[]
1869+
.Arguments
1870+
[cols="30,70"]
1871+
|===
1872+
|Option |Definition
1873+
1874+
|`--exec-plugin`
1875+
|Specifies the type of exec plugin credentials used to authenticate the external OIDC issuer. Currently, only `oc-oidc` is supported.
1876+
1877+
|`--issuer-url`
1878+
|Issuer URL for the external issuer. Required.
1879+
1880+
|`--client-id`
1881+
|Client ID for the external OIDC issuer. Only supports Auth Code and PKCE. Required.
1882+
1883+
|`--extra-scopes`
1884+
|Extra scopes for the external OIDC issuer. Optional.
1885+
1886+
|`--callback-port`
1887+
|The port that the callback server is redirected to after authentication flow is complete. The default is any random, open port.
18631888

1889+
|`--oidc-certificate-authority`
1890+
|Path to a certificate file for the external OIDC certificate authority.
1891+
|===
1892+
endif::openshift-dedicated,openshift-rosa[]
18641893

18651894
== oc logout
18661895
End the current server session

0 commit comments

Comments
 (0)