Skip to content

Commit ceb5461

Browse files
author
Open Identity Platform Community
committed
upload OpenAM docs after deploy 1a2a5629c29c8c6055b4fa6e3dac492d41bae370
1 parent 3cab351 commit ceb5461

File tree

15 files changed

+154
-278
lines changed

15 files changed

+154
-278
lines changed

openam/modules/admin-guide/pages/chap-authz-policy.adoc

Lines changed: 2 additions & 4 deletions
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!:
@@ -66,7 +66,6 @@ To help with the creation of policies, OpenAM uses __resource types__ and __poli
6666
6767
Resource types::
6868
Resource types define a template for the resources that policies apply to, and the actions that could be performed on those resources.
69-
7069
+
7170
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:
7271
+
@@ -87,7 +86,6 @@ For example, the `URL` resource type that is included by default in OpenAM acts
8786
8887
+
8988
OpenAM also includes a resource type to protect REST endpoints, with patterns including `https://*:*/*?*` and the CRUDPAQ actions:
90-
+
9189
9290
* `CREATE`
9391
@@ -363,7 +361,7 @@ image::ROOT:policy-editor-valid-drop-points.png[]
363361
image::ROOT:policy-subjects.png[]
364362
365363
The available subject condition types are:
366-
+
364+
367365
--
368366
369367
Authenticated Users::

openam/modules/admin-guide/pages/chap-oauth2.adoc

Lines changed: 22 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -195,34 +195,27 @@ If OpenAM is already a SAML v2.0 service provider, you can configure OpenAM as O
195195
[#oauth2-endpoints]
196196
===== OpenAM OAuth 2.0 Endpoints
197197
198-
--
199198
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.
200199
201200
`/oauth2/authorize`::
202201
Authorization endpoint defined in RFC 6749, used to obtain an authorization grant from the resource owner.
203-
204202
+
203+
--
205204
The `/oauth2/authorize` endpoint is protected by the policy you created after OAuth 2.0 authorization server configuration, which grants all authenticated users access.
206205
207-
+
208206
The following is an example URL for obtaining consent:
209207
210-
+
211208
`\https://openam.example.com:8443/openam/oauth2/realms/root/authorize\ ?client_id=myClient\ &response_type=code\ &scope=profile\ &redirect_uri=https://www.example.com`
212209
213-
+
214210
After logging in, the URL above presents the OAuth 2.0 consent screen, similar to the following:
215-
+
216211
217212
[#figure-oauth2-consent-screen-xui]
218213
image::ROOT:oauth2-authz-page-xui.png[]
219-
+
220-
+
214+
221215
If creating your own consent page, you can create a POST request to the endpoint with the following additional parameters:
222-
+
216+
223217
[open]
224218
====
225-
226219
`decision`::
227220
Whether the resource owner consents to the requested access, or denies consent.
228221
@@ -232,13 +225,10 @@ Valid values are `allow` or `deny`.
232225
`save_consent`::
233226
Updates the resource owner's profile to avoid having to prompt the resource owner to grant authorization when the client issues subsequent authorization requests.
234227
235-
+
236228
To save consent, set the `save_consent` property to `on`.
237229
238-
+
239230
You must provide the __Saved Consent Attribute Name__ property with a profile attribute in which to store the resource owner's consent decision.
240231
241-
+
242232
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__.
243233
244234
`csrf`::
@@ -248,9 +238,8 @@ Duplicates the contents of the `iPlanetDirectoryPro` cookie, which contains the
248238
Duplicating the cookie value helps prevent against Cross-Site Request Forgery (CSRF) attacks.
249239
250240
====
251-
+
241+
252242
Example:
253-
+
254243
255244
[source, console]
256245
----
@@ -268,32 +257,28 @@ $ curl \
268257
"https://openam.example.com:8443/openam/oauth2/authorize?response_type=code&client_id=myClient"\
269258
"&realm=/&scope=profile&redirect_uri=http://www.example.net"
270259
----
271-
+
260+
272261
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`.
273262
274-
+
263+
275264
The `/oauth2/authorize` endpoint can take additional parameters, such as:
276-
+
277265
278266
* `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.
279267
280268
* `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.
281269
282270
* `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__.
283-
271+
--
284272
285273
`/oauth2/access_token`::
286274
Token endpoint defined in RFC 6749, used to obtain an access token from the authorization server.
287-
288275
+
276+
--
289277
Example: `\https://openam.example.com:8443/openam/oauth2/access_token`
290278
291-
+
292279
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.
293280
294-
+
295281
The following example shows how a client can specify the authentication chain, `myAuthChain`:
296-
+
297282
298283
[source, console]
299284
----
@@ -303,24 +288,25 @@ $ curl \
303288
--data "grant_type=password&username=amadmin&password=cangetinam&scope=profile&auth_chain=myAuthChain" \
304289
https://openam.example.com:8443/openam/oauth2/access_token
305290
----
306-
+
291+
307292
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.
308293
309-
+
310294
For example, if the OAuth 2.0 provider is configured for the `/customers` realm, then use `/oauth2/customers/access_token`.
295+
--
311296
312297
`/oauth2/device`::
313298
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.
314-
315299
+
300+
--
316301
Example: `\https://openam.example.com:8443/openam/oauth2/device/code`
317302
318-
+
319303
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__.
304+
--
320305
321306
`/oauth2/token/revoke`::
322307
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:
323308
+
309+
--
324310
325311
[source, console]
326312
----
@@ -331,28 +317,23 @@ $ curl \
331317
--data "client_secret=password" \
332318
https://openam.example.com:8443/openam/oauth2/token/revoke
333319
----
334-
+
335-
+
320+
336321
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.
322+
--
337323
338324
`/oauth2/tokeninfo`::
339325
Endpoint __not__ defined in RFC 6749, used to validate tokens, and to retrieve information, such as scopes.
340-
341326
+
327+
--
342328
The `/oauth2/tokeninfo` endpoint takes an HTTP GET on `/oauth2/tokeninfo?access_token=token-id`, and returns information about the token.
343329
344-
+
345330
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.
346331
347-
+
348332
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.
349333
350-
+
351334
Example: `\https://openam.example.com:8443/openam/oauth2/tokeninfo`
352335
353-
+
354336
The following example shows OpenAM issuing an access token, and then returning token information:
355-
+
356337
357338
[source, console]
358339
----
@@ -395,7 +376,6 @@ $ curl https://openam.example.com:8443/openam/oauth2/tokeninfo\
395376
"access_token": "f9063e26-3a29-41ec-86de-1d0d68aa85e9"
396377
}
397378
----
398-
+
399379
400380
[NOTE]
401381
======
@@ -409,15 +389,16 @@ $ curl \
409389
"https://openam.example.com:8443/openam/oauth2/tokeninfo"
410390
----
411391
======
412-
+
392+
413393
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`.
394+
--
414395
415396
`/oauth2/introspect`::
416397
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.
417-
418398
+
399+
--
419400
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:
420-
+
401+
421402
[open]
422403
====
423404
@@ -446,12 +427,10 @@ Subject of the token.
446427
Issuer of the token.
447428
448429
====
449-
+
430+
450431
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.
451432
452-
+
453433
The following example demonstrates the `/oauth2/introspect` endpoint with basic authorization:
454-
+
455434
456435
[source, console]
457436
----
@@ -471,7 +450,6 @@ $ curl \
471450
"iss": "https://openam.example.com/"
472451
}
473452
----
474-
+
475453
476454
[NOTE]
477455
======
@@ -486,11 +464,9 @@ $ curl \
486464
"https://openam.example.com:8443/openam/oauth2/introspect"
487465
----
488466
======
489-
490467
--
491-
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__.
492-
493468
469+
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__.
494470
495471
[#openam-oauth2-client]
496472
==== OpenAM as OAuth 2.0 Client and Resource Server Solution

openam/modules/admin-guide/pages/chap-radius.adoc

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ For more information on the RADIUS Server service configuration properties, see
171171
172172
. Create a file named `radius.properties` in the current working directory. The file consists of the following key-value pairs:
173173
+
174-
174+
--
175175
* `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.
176176
177177
* `host` - Mandatory property specifying the host name or IP address of the OpenAM server.
@@ -180,9 +180,7 @@ For more information on the RADIUS Server service configuration properties, see
180180
181181
* `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.
182182
183-
+
184183
The following is an example `radius.properties` file:
185-
+
186184
187185
[source, console]
188186
----
@@ -191,10 +189,9 @@ host=openam.example.com
191189
port=1812
192190
show-traffic=true
193191
----
194-
192+
--
195193
. 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:
196194
+
197-
198195
[source, console, subs="attributes"]
199196
----
200197
$ java -jar //path/to/tomcat/webapps/openam/WEB-INF/lib/openam-radius-server-{openam-version}.jar
@@ -220,7 +217,6 @@ Packet From openam.example.com:1812
220217
==== Solutions to Common RADIUS Server Service Issues
221218
222219
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.
223-
--
224220
225221
Client Cannot Connect::
226222
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:
@@ -359,14 +355,12 @@ To fix this problem, correct the client configuration in the RADIUS Server servi
359355
Configuration Is Correct but Authentication Fails::
360356
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:
361357
+
362-
358+
--
363359
* The `org.forgerock.openam.radius.server.spi.handlers.AcceptAllHandler` handler always returns an `Access-Accept` packet, indicating successful authentication for all requests.
364360
365361
* The `org.forgerock.openam.radius.server.spi.handlers.RejectAllHandler` handler always returns an `Access-Reject` packet, indicating failed authentication for all requests.
366362
367-
+
368363
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:
369-
+
370364
371365
[source, console]
372366
----
@@ -378,30 +372,25 @@ Packet from TestClient:
378372
- NAS_IP_ADDRESS : /127.0.0.1
379373
- NAS_PORT : 0
380374
----
381-
+
382-
+
375+
383376
This is followed by:
384-
+
385377
386378
[source, console]
387379
----
388380
WARNING:
389381
Packet to TestClient:
390382
ACCESS_ACCEPT [1]
391383
----
392-
+
393-
+
384+
394385
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.
386+
--
395387
396388
Authentication Always Succeeds, Even With a Bad Password::
397389
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.
398390
399391
+
400392
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.
401393
402-
--
403-
404-
405394
406395
[#radius-limitations]
407396
=== RADIUS Server Limitations

0 commit comments

Comments
 (0)