Skip to content

Commit 44a9da6

Browse files
committed
chore(docs): Update auth related docs with example access_token oAuth configs.
Signed-off-by: spbsoluble <[email protected]>
1 parent 973ccd7 commit 44a9da6

File tree

2 files changed

+70
-6
lines changed

2 files changed

+70
-6
lines changed

README.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Currently `Basic Authentication` via `Active Directory` is the *ONLY* supported
8080
| KEYFACTOR_PASSWORD | Password associated with Active Directory username to authenticate to Keyfactor Command API | |
8181
| KEYFACTOR_DOMAIN | Active Directory domain of user. Can be implied from username if it contains `@` or `\\` | |
8282

83-
### oAuth Client Credentials
83+
### oAuth Credentials
8484

8585
| Name | Description | Default |
8686
|------------------------------|---------------------------------------------------------------------------------------------------------------------------------|----------|
@@ -104,8 +104,12 @@ and use them if they are set.
104104

105105
### Linux/MacOS:
106106

107+
Below are examples of setting the environment variables in Linux/MacOS to be used with `kfutil`.
108+
107109
#### Active Directory Basic Authentication
108110

111+
This is the minimum required configuration to authenticate to Keyfactor Command using Active Directory username,
112+
password auth.
109113
```bash
110114
export KEYFACTOR_HOSTNAME="<mykeyfactorhost.mydomain.com>"
111115
export KEYFACTOR_USERNAME="<myusername>"
@@ -115,25 +119,42 @@ export KEYFACTOR_DOMAIN="<mykeyfactordomain>" # Optional if username contains do
115119

116120
#### oAuth Client Credentials
117121

122+
This is the minimum required configuration to authenticate to Keyfactor Command using oAuth client credentials.
118123
```bash
119124
export KEYFACTOR_HOSTNAME="<mykeyfactorhost.mydomain.com>"
120125
export KEYFACTOR_AUTH_CLIENT_ID="<my-oauth2-client-id"
121126
export KEYFACTOR_AUTH_CLIENT_SECRET="<my-oauth2-client-secret>"
122127
export KEYFACTOR_AUTH_TOKEN_URL="<mykeyfactorhost.mydomain.com>/protocol/openid-connect/token"
123128
```
124129

130+
#### oAuth Access Token
131+
132+
This is the minimum required configuration to authenticate to Keyfactor Command using an access token.
133+
134+
```bash
135+
export KEYFACTOR_HOSTNAME="<mykeyfactorhost.mydomain.com>"
136+
export KEYFACTOR_AUTH_ACCESS_TOKEN="<my-access-token>"
137+
```
138+
125139
#### Additional variables
126140

127141
```bash
128142
export KEYFACTOR_API_PATH="/KeyfactorAPI" # Defaults to /KeyfactorAPI if not set ex. my.domain.com/KeyfactorAPI
129-
export KFUTIL_EXP=0 # Set to 1 or true to enable experimental features
130-
export KFUTIL_DEBUG=0 # Set to 1 or true to enable debug logging
143+
export KEYFACTOR_CA_CERT="/path/to/ca.crt" # Optional
144+
export KEYFACTOR_SKIP_VERIFY=0 # Set to 1 or true to skip TLS certificate verification. This is NOT recommended for production.
145+
export KFUTIL_EXP=0 # Set to 1 or true to enable experimental features. This is NOT recommended for production.
146+
export KFUTIL_DEBUG=0 # Set to 1 or true to enable debug logging. This is NOT recommended for production.
131147
```
132148

133149
### Windows Powershell:
134150

151+
Below are examples of setting the environment variables in Windows Powershell to be used with `kfutil`.
152+
135153
#### Active Directory Basic Authentication
136154

155+
This is the minimum required configuration to authenticate to Keyfactor Command using Active Directory username,
156+
password auth.
157+
137158
```powershell
138159
$env:KEYFACTOR_HOSTNAME = "<mykeyfactorhost.mydomain.com>"
139160
$env:KEYFACTOR_USERNAME = "<myusername>" # Do not include domain
@@ -143,13 +164,24 @@ $env:KEYFACTOR_DOMAIN = "<mykeyfactordomain>"
143164

144165
#### oAuth Client Credentials
145166

167+
This is the minimum required configuration to authenticate to Keyfactor Command using client credentials.
168+
146169
```powershell
147170
$env:KEYFACTOR_HOSTNAME = "<mykeyfactorhost.mydomain.com>"
148171
$env:KEYFACTOR_AUTH_CLIENT_ID = "<my-oauth2-client>"
149172
$env:KEYFACTOR_AUTH_CLIENT_SECRET = "<my-oauth2-client-secret>"
150173
$env:KEYFACTOR_AUTH_TOKEN_URL = "<mykeyfactorhost.mydomain.com>/protocol/openid-connect/token"
151174
```
152175

176+
#### oAuth Access Token
177+
178+
This is the minimum required configuration to authenticate to Keyfactor Command using an access token.
179+
180+
```powershell
181+
$env:KEYFACTOR_HOSTNAME = "<mykeyfactorhost.mydomain.com>"
182+
$env:KEYFACTOR_AUTH_ACCESS_TOKEN = "<my-access-token>"
183+
```
184+
153185
#### Additional variables:
154186

155187
```bash

readme_source.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Currently `Basic Authentication` via `Active Directory` is the *ONLY* supported
5858
| KEYFACTOR_PASSWORD | Password associated with Active Directory username to authenticate to Keyfactor Command API | |
5959
| KEYFACTOR_DOMAIN | Active Directory domain of user. Can be implied from username if it contains `@` or `\\` | |
6060

61-
### oAuth Client Credentials
61+
### oAuth Credentials
6262

6363
| Name | Description | Default |
6464
|------------------------------|---------------------------------------------------------------------------------------------------------------------------------|----------|
@@ -82,8 +82,12 @@ and use them if they are set.
8282

8383
### Linux/MacOS:
8484

85+
Below are examples of setting the environment variables in Linux/MacOS to be used with `kfutil`.
86+
8587
#### Active Directory Basic Authentication
8688

89+
This is the minimum required configuration to authenticate to Keyfactor Command using Active Directory username,
90+
password auth.
8791
```bash
8892
export KEYFACTOR_HOSTNAME="<mykeyfactorhost.mydomain.com>"
8993
export KEYFACTOR_USERNAME="<myusername>"
@@ -93,25 +97,42 @@ export KEYFACTOR_DOMAIN="<mykeyfactordomain>" # Optional if username contains do
9397

9498
#### oAuth Client Credentials
9599

100+
This is the minimum required configuration to authenticate to Keyfactor Command using oAuth client credentials.
96101
```bash
97102
export KEYFACTOR_HOSTNAME="<mykeyfactorhost.mydomain.com>"
98103
export KEYFACTOR_AUTH_CLIENT_ID="<my-oauth2-client-id"
99104
export KEYFACTOR_AUTH_CLIENT_SECRET="<my-oauth2-client-secret>"
100105
export KEYFACTOR_AUTH_TOKEN_URL="<mykeyfactorhost.mydomain.com>/protocol/openid-connect/token"
101106
```
102107

108+
#### oAuth Access Token
109+
110+
This is the minimum required configuration to authenticate to Keyfactor Command using an access token.
111+
112+
```bash
113+
export KEYFACTOR_HOSTNAME="<mykeyfactorhost.mydomain.com>"
114+
export KEYFACTOR_AUTH_ACCESS_TOKEN="<my-access-token>"
115+
```
116+
103117
#### Additional variables
104118

105119
```bash
106120
export KEYFACTOR_API_PATH="/KeyfactorAPI" # Defaults to /KeyfactorAPI if not set ex. my.domain.com/KeyfactorAPI
107-
export KFUTIL_EXP=0 # Set to 1 or true to enable experimental features
108-
export KFUTIL_DEBUG=0 # Set to 1 or true to enable debug logging
121+
export KEYFACTOR_CA_CERT="/path/to/ca.crt" # Optional
122+
export KEYFACTOR_SKIP_VERIFY=0 # Set to 1 or true to skip TLS certificate verification. This is NOT recommended for production.
123+
export KFUTIL_EXP=0 # Set to 1 or true to enable experimental features. This is NOT recommended for production.
124+
export KFUTIL_DEBUG=0 # Set to 1 or true to enable debug logging. This is NOT recommended for production.
109125
```
110126

111127
### Windows Powershell:
112128

129+
Below are examples of setting the environment variables in Windows Powershell to be used with `kfutil`.
130+
113131
#### Active Directory Basic Authentication
114132

133+
This is the minimum required configuration to authenticate to Keyfactor Command using Active Directory username,
134+
password auth.
135+
115136
```powershell
116137
$env:KEYFACTOR_HOSTNAME = "<mykeyfactorhost.mydomain.com>"
117138
$env:KEYFACTOR_USERNAME = "<myusername>" # Do not include domain
@@ -121,13 +142,24 @@ $env:KEYFACTOR_DOMAIN = "<mykeyfactordomain>"
121142

122143
#### oAuth Client Credentials
123144

145+
This is the minimum required configuration to authenticate to Keyfactor Command using client credentials.
146+
124147
```powershell
125148
$env:KEYFACTOR_HOSTNAME = "<mykeyfactorhost.mydomain.com>"
126149
$env:KEYFACTOR_AUTH_CLIENT_ID = "<my-oauth2-client>"
127150
$env:KEYFACTOR_AUTH_CLIENT_SECRET = "<my-oauth2-client-secret>"
128151
$env:KEYFACTOR_AUTH_TOKEN_URL = "<mykeyfactorhost.mydomain.com>/protocol/openid-connect/token"
129152
```
130153

154+
#### oAuth Access Token
155+
156+
This is the minimum required configuration to authenticate to Keyfactor Command using an access token.
157+
158+
```powershell
159+
$env:KEYFACTOR_HOSTNAME = "<mykeyfactorhost.mydomain.com>"
160+
$env:KEYFACTOR_AUTH_ACCESS_TOKEN = "<my-access-token>"
161+
```
162+
131163
#### Additional variables:
132164

133165
```bash

0 commit comments

Comments
 (0)