Skip to content

Commit 1a2a562

Browse files
authored
Update documentation formatting (#867)
1 parent 5fef70c commit 1a2a562

15 files changed

+154
-278
lines changed

Diff for: openam-documentation/openam-doc-source/src/main/asciidoc/admin-guide/chap-authz-policy.adoc

+2-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
information: "Portions copyright [year] [name of copyright owner]".
1313

1414
Copyright 2017 ForgeRock AS.
15-
Portions Copyright 2024 3A Systems LLC.
15+
Portions Copyright 2024-2025 3A Systems LLC.
1616
////
1717
1818
:figure-caption!:
@@ -65,7 +65,6 @@ To help with the creation of policies, OpenAM uses __resource types__ and __poli
6565
6666
Resource types::
6767
Resource types define a template for the resources that policies apply to, and the actions that could be performed on those resources.
68-
6968
+
7069
For example, the `URL` resource type that is included by default in OpenAM acts as a template for protecting web pages or applications. It contains resource patterns, such as `*://*:*/*?*`, which can be made more specific when used in the policy. The actions that the resource supports are also defined, as follows:
7170
+
@@ -86,7 +85,6 @@ For example, the `URL` resource type that is included by default in OpenAM acts
8685
8786
+
8887
OpenAM also includes a resource type to protect REST endpoints, with patterns including `https://*:*/*?*` and the CRUDPAQ actions:
89-
+
9088
9189
* `CREATE`
9290
@@ -362,7 +360,7 @@ image::images/policy-editor-valid-drop-points.png[]
362360
image::images/policy-subjects.png[]
363361
364362
The available subject condition types are:
365-
+
363+
366364
--
367365
368366
Authenticated Users::

Diff for: openam-documentation/openam-doc-source/src/main/asciidoc/admin-guide/chap-oauth2.adoc

+22-46
Original file line numberDiff line numberDiff line change
@@ -194,34 +194,27 @@ If OpenAM is already a SAML v2.0 service provider, you can configure OpenAM as O
194194
[#oauth2-endpoints]
195195
===== OpenAM OAuth 2.0 Endpoints
196196
197-
--
198197
In addition to the standard authorization and token endpoints described in RFC 6749, OpenAM also exposes a token information endpoint for resource servers to get information about access tokens so they can determine how to respond to requests for protected resources, and an introspection endpoint to retrieve metadata about a token, such as approved scopes and the context in which the token was issued. OpenAM as authorization server exposes the following endpoints for clients and resource servers.
199198
200199
`/oauth2/authorize`::
201200
Authorization endpoint defined in RFC 6749, used to obtain an authorization grant from the resource owner.
202-
203201
+
202+
--
204203
The `/oauth2/authorize` endpoint is protected by the policy you created after OAuth 2.0 authorization server configuration, which grants all authenticated users access.
205204
206-
+
207205
The following is an example URL for obtaining consent:
208206
209-
+
210207
`\https://openam.example.com:8443/openam/oauth2/realms/root/authorize\ ?client_id=myClient\ &response_type=code\ &scope=profile\ &redirect_uri=https://www.example.com`
211208
212-
+
213209
After logging in, the URL above presents the OAuth 2.0 consent screen, similar to the following:
214-
+
215210
216211
[#figure-oauth2-consent-screen-xui]
217212
image::images/oauth2-authz-page-xui.png[]
218-
+
219-
+
213+
220214
If creating your own consent page, you can create a POST request to the endpoint with the following additional parameters:
221-
+
215+
222216
[open]
223217
====
224-
225218
`decision`::
226219
Whether the resource owner consents to the requested access, or denies consent.
227220
@@ -231,13 +224,10 @@ Valid values are `allow` or `deny`.
231224
`save_consent`::
232225
Updates the resource owner's profile to avoid having to prompt the resource owner to grant authorization when the client issues subsequent authorization requests.
233226
234-
+
235227
To save consent, set the `save_consent` property to `on`.
236228
237-
+
238229
You must provide the __Saved Consent Attribute Name__ property with a profile attribute in which to store the resource owner's consent decision.
239230
240-
+
241231
For more information on setting this property in the OAuth2 Provider service, see xref:../reference/chap-config-ref.adoc#oauth2-provider-configuration["OAuth2 Provider"] in the __Reference__.
242232
243233
`csrf`::
@@ -247,9 +237,8 @@ Duplicates the contents of the `iPlanetDirectoryPro` cookie, which contains the
247237
Duplicating the cookie value helps prevent against Cross-Site Request Forgery (CSRF) attacks.
248238
249239
====
250-
+
240+
251241
Example:
252-
+
253242
254243
[source, console]
255244
----
@@ -267,32 +256,28 @@ $ curl \
267256
"https://openam.example.com:8443/openam/oauth2/authorize?response_type=code&client_id=myClient"\
268257
"&realm=/&scope=profile&redirect_uri=http://www.example.net"
269258
----
270-
+
259+
271260
You must specify the realm if the OpenAM OAuth 2.0 provider is configured for a subrealm rather than the top-level realm. For example, if the OAuth 2.0 provider is configured for the `/customers` realm, then use `/oauth2/customers/authorize`.
272261
273-
+
262+
274263
The `/oauth2/authorize` endpoint can take additional parameters, such as:
275-
+
276264
277265
* `module` and `service`. Use either as described in xref:../admin-guide/chap-auth-services.adoc#authn-from-browser["Authenticating To OpenAM"], where `module` specifies the authentication module instance to use or `service` specifies the authentication chain to use when authenticating the resource owner.
278266
279267
* `response_mode=form_post`. Use this parameter to return a self-submitting form that contains the code instead of redirecting to the redirect URL with the code as a string parameter. For more information, see the link:https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html[OAuth 2.0 Form Post Response Mode, window=\_blank] spec.
280268
281269
* `code_challenge`. Use this parameter when __Proof Key for Code Exchange__ (PKCE) support is enabled in the OAuth2 Provider service. To configure it, navigate to Realms > __Realm Name__ > Services > OAuth2 Provider > Advanced and enable the Code Verifier Parameter Required property. For more information about the PKCE support, see link:https://tools.ietf.org/html/rfc7636[Proof Key for Code Exchange by OAuth Public Clients, window=\_top] - __RFC 7636__.
282-
270+
--
283271
284272
`/oauth2/access_token`::
285273
Token endpoint defined in RFC 6749, used to obtain an access token from the authorization server.
286-
287274
+
275+
--
288276
Example: `\https://openam.example.com:8443/openam/oauth2/access_token`
289277
290-
+
291278
The `/oauth2/access_token` endpoint can take an additional parameter, `auth_chain=authentication-chain`, which allows client to specify the authentication chain to use for Password Grant Type.
292279
293-
+
294280
The following example shows how a client can specify the authentication chain, `myAuthChain`:
295-
+
296281
297282
[source, console]
298283
----
@@ -302,24 +287,25 @@ $ curl \
302287
--data "grant_type=password&username=amadmin&password=cangetinam&scope=profile&auth_chain=myAuthChain" \
303288
https://openam.example.com:8443/openam/oauth2/access_token
304289
----
305-
+
290+
306291
The `/oauth2/access_token` endpoint can take additional parameters. In particular, you must specify the realm if the OpenAM OAuth 2.0 provider is configured for a subrealm rather than the top-level realm.
307292
308-
+
309293
For example, if the OAuth 2.0 provider is configured for the `/customers` realm, then use `/oauth2/customers/access_token`.
294+
--
310295
311296
`/oauth2/device`::
312297
Device flow endpoint as defined by the link:https://datatracker.ietf.org/doc/draft-denniss-oauth-device-flow/[Internet-Draft OAuth 2.0 Device Flow, window=\_top], used by a client device to obtain a device code or an access token.
313-
314298
+
299+
--
315300
Example: `\https://openam.example.com:8443/openam/oauth2/device/code`
316301
317-
+
318302
For more information, see xref:../dev-guide/chap-client-dev.adoc#rest-api-oauth2-device-flow["Using Endpoints for OAuth 2.0 Device Flow"] in the __Developer's Guide__.
303+
--
319304
320305
`/oauth2/token/revoke`::
321306
When a user logs out of an application, the application revokes any OAuth 2.0 tokens (access and refresh tokens) that are associated with the user. The client can also revoke a token without the need of an `SSOToken` by sending a request to the `/oauth2/token/revoke` endpoint as follows:
322307
+
308+
--
323309
324310
[source, console]
325311
----
@@ -330,28 +316,23 @@ $ curl \
330316
--data "client_secret=password" \
331317
https://openam.example.com:8443/openam/oauth2/token/revoke
332318
----
333-
+
334-
+
319+
335320
If you are revoking an access token, then that token will be revoked. If you are revoking a refresh token, then both the refresh token and any other associated access tokens will also be revoked. __Associated access tokens__ means that any other tokens that have come out of the same authorization grant will also be revoked. For cases where a client has multiple access tokens for a single user that were obtained via different authorization grants, then the client will have to make multiple calls to the `/oauth2/token/revoke` endpoint to invalidate each token.
321+
--
336322
337323
`/oauth2/tokeninfo`::
338324
Endpoint __not__ defined in RFC 6749, used to validate tokens, and to retrieve information, such as scopes.
339-
340325
+
326+
--
341327
The `/oauth2/tokeninfo` endpoint takes an HTTP GET on `/oauth2/tokeninfo?access_token=token-id`, and returns information about the token.
342328
343-
+
344329
Resource servers — or any party having the token ID — can get token information through this endpoint without authenticating. This means any application or user can validate the token without having to be registered with OpenAM.
345330
346-
+
347331
Given an access token, a resource server can perform an HTTP GET on `/oauth2/tokeninfo?access_token=token-id` to retrieve a JSON object indicating `token_type`, `expires_in`, `scope`, and the `access_token` ID.
348332
349-
+
350333
Example: `\https://openam.example.com:8443/openam/oauth2/tokeninfo`
351334
352-
+
353335
The following example shows OpenAM issuing an access token, and then returning token information:
354-
+
355336
356337
[source, console]
357338
----
@@ -394,7 +375,6 @@ $ curl https://openam.example.com:8443/openam/oauth2/tokeninfo\
394375
"access_token": "f9063e26-3a29-41ec-86de-1d0d68aa85e9"
395376
}
396377
----
397-
+
398378
399379
[NOTE]
400380
======
@@ -408,15 +388,16 @@ $ curl \
408388
"https://openam.example.com:8443/openam/oauth2/tokeninfo"
409389
----
410390
======
411-
+
391+
412392
The resource server making decisions about whether the token is valid can thus use the `/oauth2/tokeninfo` endpoint to retrieve expiration information about the token. Depending on the scopes implementation, the JSON response about the token can also contain scope information. As described in xref:../admin-guide/chap-oauth2.adoc#oauth2-byo-client["Using Your Own Client and Resource Server"], the default scopes implementation in OpenAM considers scopes to be names of attributes in the resource owner's user profile. Notice that the JSON response contains the values for those attributes from the user's profile, as in the preceding example, with scopes set to `mail` and `cn`.
393+
--
413394
414395
`/oauth2/introspect`::
415396
Endpoint defined in link:http://tools.ietf.org/html/draft-ietf-oauth-introspection-04[draft-ietf-oauth-introspection-04, window=\_top], used to retrieve metadata about a token, such as approved scopes and the context in which the token was issued.
416-
417397
+
398+
--
418399
Given an access token, a client can perform an HTTP POST on `/oauth2/introspect?token=access_token` to retrieve a JSON object indicating the following:
419-
+
400+
420401
[open]
421402
====
422403
@@ -445,12 +426,10 @@ Subject of the token.
445426
Issuer of the token.
446427
447428
====
448-
+
429+
449430
The `/oauth2/introspect` endpoint requires authentication, and supports basic authorization (a base64-encoded string of `client_id:client_secret`), `client_id` and `client_secret` passed as header values, or a JWT bearer token.
450431
451-
+
452432
The following example demonstrates the `/oauth2/introspect` endpoint with basic authorization:
453-
+
454433
455434
[source, console]
456435
----
@@ -470,7 +449,6 @@ $ curl \
470449
"iss": "https://openam.example.com/"
471450
}
472451
----
473-
+
474452
475453
[NOTE]
476454
======
@@ -485,11 +463,9 @@ $ curl \
485463
"https://openam.example.com:8443/openam/oauth2/introspect"
486464
----
487465
======
488-
489466
--
490-
For examples, and information about OAuth 2.0 token administration and client administration endpoints that are specific to OpenAM, see xref:../dev-guide/chap-client-dev.adoc#rest-api-oauth2["OAuth 2.0"] in the __Developer's Guide__.
491-
492467
468+
For examples, and information about OAuth 2.0 token administration and client administration endpoints that are specific to OpenAM, see xref:../dev-guide/chap-client-dev.adoc#rest-api-oauth2["OAuth 2.0"] in the __Developer's Guide__.
493469
494470
[#openam-oauth2-client]
495471
==== OpenAM as OAuth 2.0 Client and Resource Server Solution

Diff for: openam-documentation/openam-doc-source/src/main/asciidoc/admin-guide/chap-radius.adoc

+6-17
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ For more information on the RADIUS Server service configuration properties, see
170170
171171
. Create a file named `radius.properties` in the current working directory. The file consists of the following key-value pairs:
172172
+
173-
173+
--
174174
* `secret` - Mandatory property specifying the RADIUS client's shared secret. This property's value must be identical to the value of the Client Secret property for the RADIUS client in the OpenAM RADIUS Server service configuration.
175175
176176
* `host` - Mandatory property specifying the host name or IP address of the OpenAM server.
@@ -179,9 +179,7 @@ For more information on the RADIUS Server service configuration properties, see
179179
180180
* `show-traffic` - Optional property specifying whether to show traffic packet during client operation. Valid values are `true` and `false`. Packet traffic is not shown if this property is not specified.
181181
182-
+
183182
The following is an example `radius.properties` file:
184-
+
185183
186184
[source, console]
187185
----
@@ -190,10 +188,9 @@ host=openam.example.com
190188
port=1812
191189
show-traffic=true
192190
----
193-
191+
--
194192
. Make sure that your current working directory is the directory in which you created the `radius.properties` file, then execute the sample client. Messages from the sample client indicate success or failure authenticating. If you specify `show-traffic=true` in the `radius.properties` file, the packets to and from the OpenAM RADIUS server appear in standard output:
195193
+
196-
197194
[source, console, subs="attributes"]
198195
----
199196
$ java -jar //path/to/tomcat/webapps/openam/WEB-INF/lib/openam-radius-server-{openam-version}.jar
@@ -219,7 +216,6 @@ Packet From openam.example.com:1812
219216
==== Solutions to Common RADIUS Server Service Issues
220217
221218
This section offers solutions to issues that you might encounter when configuring communication between RADIUS clients and the RADIUS Server service. The solutions assume that you have enabled message-level debugging for the RADIUS Server service in OpenAM and have access to the debug logs.
222-
--
223219
224220
Client Cannot Connect::
225221
When a RADIUS client connects to OpenAM's RADIUS server and hangs without receiving a response, the problem could be one of four possible issues:
@@ -358,14 +354,12 @@ To fix this problem, correct the client configuration in the RADIUS Server servi
358354
Configuration Is Correct but Authentication Fails::
359355
In this case, you might have a client-specific problem. OpenAM provides a tool that you can use to eliminate OpenAM and its configuration as the cause of the problem. You can declare an alternate handler class implementation in the RADIUS Server service configuration. Two test handlers are available for troubleshooting purposes:
360356
+
361-
357+
--
362358
* The `org.forgerock.openam.radius.server.spi.handlers.AcceptAllHandler` handler always returns an `Access-Accept` packet, indicating successful authentication for all requests.
363359
364360
* The `org.forgerock.openam.radius.server.spi.handlers.RejectAllHandler` handler always returns an `Access-Reject` packet, indicating failed authentication for all requests.
365361
366-
+
367362
In a case where you believe that configuration is correct but authentication always fails, you could specify the `org.forgerock.openam.radius.server.spi.handlers.AcceptAllHandler` handler class in the RADIUS Server service configuration for your client. With packet logging enabled, all requests received from the client should log packet contents traffic similar to the following even if the password is incorrect:
368-
+
369363
370364
[source, console]
371365
----
@@ -377,30 +371,25 @@ Packet from TestClient:
377371
- NAS_IP_ADDRESS : /127.0.0.1
378372
- NAS_PORT : 0
379373
----
380-
+
381-
+
374+
382375
This is followed by:
383-
+
384376
385377
[source, console]
386378
----
387379
WARNING:
388380
Packet to TestClient:
389381
ACCESS_ACCEPT [1]
390382
----
391-
+
392-
+
383+
393384
If the client still indicates that authentication has failed, refer to the documentation for the client to determine why the `Access-Accept` response is rejected. Most likely, the client expects specific fields in the `Access-Accept` response that are not provided by OpenAM. There is currently no facility in OpenAM to return fields in `Access-Accept` responses.
385+
--
394386
395387
Authentication Always Succeeds, Even With a Bad Password::
396388
This would be a very unusual situation, probably due to the `org.forgerock.openam.radius.server.spi.handlers.AcceptAllHandler` handler being left in place after troubleshooting an error scenario in which authentication always suceeds.
397389
398390
+
399391
To resolve the problem, verify that the correct handler class is specified in the RADIUS Server service configuration for the client. If it is not specified, review the authentication modules in the chain that authenticates users and determine whether one of the modules might be accepting all authentication requests. This situation could also occur because of incorrectly-specified module criteria in the chain's definition.
400392
401-
--
402-
403-
404393
405394
[#radius-limitations]
406395
=== RADIUS Server Limitations

0 commit comments

Comments
 (0)