Skip to content

Commit 725db1e

Browse files
committed
Add docs for OIDC with Gsuite
1 parent 2f2e748 commit 725db1e

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

β€Ždocs/GETTING_STARTED.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,70 @@ $ step ca renew site.crt site.key
453453
error renewing certificate: Unauthorized
454454
```
455455

456+
## Leverage G-Suite's OAuth OIDC as authenticate personal certificates for users
457+
458+
To authenticate users with the CA you can leverage services that expose OAuth OpenID
459+
Connect identity providers. One of the most common provider and the one we'll use in
460+
this example is G-Suite.
461+
462+
Navigate to the Google APIs developer console and pick a suitable project from the
463+
top navbar's dropdown.
464+
465+
![Google Dev Console](oidc1.png)
466+
467+
In the masthead navigation click **Credentials** (key symbol) and then "OAuth consent
468+
screen" from the subnav. Fill out naming details, all mandatory fields, and decide if
469+
your app is of type **Public** or **Internal**. Internal will make sure the access scope
470+
is bound to your G-Suite organization. **Publi** will let anybody with a Google Account
471+
log in, incl. `gmail.com` accounts.
472+
473+
Move back to **Credentials** on the subnav and choose "OAuth client ID" from the
474+
**Create credentials** dropdown. Since OIDC will be used from the `step CLI` pick **Other**
475+
from the available options and pick a name (e.g. **Step CLI**).
476+
477+
![Create credential](oidc2.png)
478+
479+
On successful completion, a confirmation modal with both `clientID` and `clientSecret` will
480+
be presented. Please note that the `clientSecret` will allow applications access to the configured
481+
OAuth consent screen. However, it will not allow direct authentication of users without their own
482+
MfA credentials per account.
483+
484+
![OIDC credentials](oidc3.png)
485+
486+
Now using `clientID` and `clientSecret` run following command to add G-Suite as a provisioner to
487+
`step certificates`. Please see [`step ca provisioner add`](https://smallstep.com/docs/cli/ca/provisioner/add/)'s docs for all available configuration options and descriptions.
488+
489+
```bash
490+
$ step ca provisioner add Google --type oidc --ca-config $(step path)/config/ca.json \
491+
--client-id 972437157139-ssiqna0g4ibuhafl3pkrrcb52tbroekt.apps.googleusercontent.com \
492+
--client-secret RjEk-GwKBvdsFAICiJhn_RiF \
493+
--configuration-endpoint https://accounts.google.com/.well-known/openid-configuration \
494+
--domain yourdomain.com --domain gmail.com
495+
```
496+
497+
Start up the online CA or send a HUP signal if it's already running to pick up the new provisioner.
498+
Now users should be able to fetch certificates using the familiar `step ca certificate` flow:
499+
500+
```bash
501+
$ step ca certificate sebastian@smallstep.com personal.crt personal.key
502+
Use the arrow keys to navigate: ↓ ↑ β†’ ←
503+
What provisioner key do you want to use?
504+
fYDoiQdYueq_LAXx2kqA4N_Yjf_eybe-wari7Js5iXI (admin)
505+
β–Έ 972437157139-ssiqna0g4ibuhafl3pkrrcb52tbroekt.apps.googleusercontent.com (Google)
506+
βœ” Key ID: 972437157139-ssiqna0g4ibuhafl3pkrrcb52tbroekt.apps.googleusercontent.com (Google)
507+
βœ” CA: https://localhost
508+
βœ” Certificate: personal.crt
509+
βœ” Private Key: personal.key
510+
511+
$ step certificate inspect --short localhost.crt
512+
X.509v3 TLS Certificate (ECDSA P-256) [Serial: 2295...5799]
513+
Subject: localhost
514+
Issuer: Local CA Intermediate CA
515+
Provisioner: admin [ID: fYDo...5iXI]
516+
Valid from: 2019-03-26T19:02:58Z
517+
to: 2019-03-27T19:02:58Z
518+
```
519+
456520
## Notes on Securing the Step CA and your PKI.
457521

458522
In this section we recommend a few best practices when it comes to

β€Ždocs/oidc1.png

58.9 KB
Loading

β€Ždocs/oidc2.png

71.7 KB
Loading

β€Ždocs/oidc3.png

57.3 KB
Loading

0 commit comments

Comments
Β (0)