Skip to content

Commit 3b371c7

Browse files
committed
Clean up repetition in arkade command
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent d81a0e4 commit 3b371c7

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

_posts/2020-09-16-openfaas-oidc-okta.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Enable Single Sign-on (SSO) for OpenFaaS with Okta and OpenID Connect"
33
description: "Learn how to enable Single Sign-on (SSO) for OpenFaaS with Okta and OpenID Connect."
44
date: 2020-09-16
5-
image: /images/2020-openfaas-arkade/briana.jpg
5+
image: /images/2020-09-oidc-okta/concentrate.jpg
66
categories:
77
- kubernetes
88
- developers
@@ -24,7 +24,7 @@ In this tutorial, I'll show you how to setup Okta and OpenFaaS with the OIDC aut
2424

2525
If you don't have an active [OpenFaaS Premium Subscription](https://www.openfaas.com/support), then you will need to apply for a trial key here: [Apply for a 14-day trial](https://forms.gle/mFmwtoez1obZzm286).
2626

27-
## Overview
27+
## Tutorial overview
2828

2929
* Create a developer account with Okta
3030
* Register a domain or DNS sub-zone
@@ -34,8 +34,6 @@ If you don't have an active [OpenFaaS Premium Subscription](https://www.openfaas
3434
* Configure your DNS
3535
* Test out logging into OpenFaaS with Okta
3636

37-
## Tutorial
38-
3937
### Create a developer account with Okta
4038

4139
Head over to [developer.okta.com](https://developer.okta.com) and create a developer account.
@@ -80,7 +78,7 @@ curl -s https://${yourOktaDomain}/oauth2/${authServerId}/.well-known/openid-conf
8078

8179
If you pipe the result to `jq`, or save it as JSON and format it, you'll see the important URLs that OpenFaaS needs:
8280

83-
```json
81+
```
8482
{
8583
"issuer": "https://dev-624219.okta.com/oauth2/default",
8684
"authorization_endpoint": "https://dev-624219.okta.com/oauth2/default/v1/authorize",
@@ -100,20 +98,22 @@ export PROVIDER="" # Set this to "azure" if using Azure AD.
10098
export LICENSE=""
10199
export OAUTH_CLIENT_SECRET=""
102100
export OAUTH_CLIENT_ID=""
101+
export ROOT_DOMAIN="oauth.openfaas.pro"
102+
export yourOktaDomain=$dev-624219.okta.com
103103

104104
arkade install openfaas \
105105
--set oauth2Plugin.enabled=true \
106106
--set oauth2Plugin.provider=$PROVIDER \
107107
--set oauth2Plugin.license=$LICENSE \
108108
--set oauth2Plugin.insecureTLS=false \
109109
--set oauth2Plugin.scopes="openid profile email" \
110-
--set oauth2Plugin.jwksURL=https://dev-624219.okta.com/oauth2/default/v1/keys \
111-
--set oauth2Plugin.tokenURL=https://dev-624219.okta.com/oauth2/default/v1/token \
112-
--set oauth2Plugin.audience=https://gw.oauth.openfaas.pro \
113-
--set oauth2Plugin.authorizeURL=https://dev-624219.okta.com/oauth2/default/v1/authorize \
114-
--set oauth2Plugin.welcomePageURL=https://gw.oauth.openfaas.pro \
115-
--set oauth2Plugin.cookieDomain=.oauth.openfaas.pro \
116-
--set oauth2Plugin.baseHost=https://auth.oauth.openfaas.pro \
110+
--set oauth2Plugin.jwksURL=https://$yourOktaDomain/oauth2/default/v1/keys \
111+
--set oauth2Plugin.tokenURL=https://$yourOktaDomain/oauth2/default/v1/token \
112+
--set oauth2Plugin.audience=https://gw.$ROOT_DOMAIN \
113+
--set oauth2Plugin.authorizeURL=https://$yourOktaDomain/oauth2/default/v1/authorize \
114+
--set oauth2Plugin.welcomePageURL=https://gw.$ROOT_DOMAIN \
115+
--set oauth2Plugin.cookieDomain=.$ROOT_DOMAIN \
116+
--set oauth2Plugin.baseHost=https://auth.$ROOT_DOMAIN \
117117
--set oauth2Plugin.clientSecret=$OAUTH_CLIENT_SECRET \
118118
--set oauth2Plugin.clientID=$OAUTH_CLIENT_ID
119119
```
134 KB
Loading

0 commit comments

Comments
 (0)