You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: openam/modules/admin-guide/pages/chap-authz-policy.adoc
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
information: "Portions copyright [year] [name of copyright owner]".
13
13
14
14
Copyright 2017 ForgeRock AS.
15
-
Portions Copyright 2024 3A Systems LLC.
15
+
Portions Copyright 2024-2025 3A Systems LLC.
16
16
////
17
17
18
18
:figure-caption!:
@@ -66,7 +66,6 @@ To help with the creation of policies, OpenAM uses __resource types__ and __poli
66
66
67
67
Resource types::
68
68
Resource types define a template for the resources that policies apply to, and the actions that could be performed on those resources.
69
-
70
69
+
71
70
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:
72
71
+
@@ -87,7 +86,6 @@ For example, the `URL` resource type that is included by default in OpenAM acts
87
86
88
87
+
89
88
OpenAM also includes a resource type to protect REST endpoints, with patterns including `https://*:*/*?*` and the CRUDPAQ actions:
Copy file name to clipboardExpand all lines: openam/modules/admin-guide/pages/chap-oauth2.adoc
+22-46Lines changed: 22 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,34 +195,27 @@ If OpenAM is already a SAML v2.0 service provider, you can configure OpenAM as O
195
195
[#oauth2-endpoints]
196
196
===== OpenAM OAuth 2.0 Endpoints
197
197
198
-
--
199
198
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.
200
199
201
200
`/oauth2/authorize`::
202
201
Authorization endpoint defined in RFC 6749, used to obtain an authorization grant from the resource owner.
203
-
204
202
+
203
+
--
205
204
The `/oauth2/authorize` endpoint is protected by the policy you created after OAuth 2.0 authorization server configuration, which grants all authenticated users access.
206
205
207
-
+
208
206
The following is an example URL for obtaining consent:
After logging in, the URL above presents the OAuth 2.0 consent screen, similar to the following:
215
-
+
216
211
217
212
[#figure-oauth2-consent-screen-xui]
218
213
image::ROOT:oauth2-authz-page-xui.png[]
219
-
+
220
-
+
214
+
221
215
If creating your own consent page, you can create a POST request to the endpoint with the following additional parameters:
222
-
+
216
+
223
217
[open]
224
218
====
225
-
226
219
`decision`::
227
220
Whether the resource owner consents to the requested access, or denies consent.
228
221
@@ -232,13 +225,10 @@ Valid values are `allow` or `deny`.
232
225
`save_consent`::
233
226
Updates the resource owner's profile to avoid having to prompt the resource owner to grant authorization when the client issues subsequent authorization requests.
234
227
235
-
+
236
228
To save consent, set the `save_consent` property to `on`.
237
229
238
-
+
239
230
You must provide the __Saved Consent Attribute Name__ property with a profile attribute in which to store the resource owner's consent decision.
240
231
241
-
+
242
232
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__.
243
233
244
234
`csrf`::
@@ -248,9 +238,8 @@ Duplicates the contents of the `iPlanetDirectoryPro` cookie, which contains the
248
238
Duplicating the cookie value helps prevent against Cross-Site Request Forgery (CSRF) attacks.
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`.
273
262
274
-
+
263
+
275
264
The `/oauth2/authorize` endpoint can take additional parameters, such as:
276
-
+
277
265
278
266
* `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.
279
267
280
268
* `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.
281
269
282
270
* `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
+
--
284
272
285
273
`/oauth2/access_token`::
286
274
Token endpoint defined in RFC 6749, used to obtain an access token from the authorization server.
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.
293
280
294
-
+
295
281
The following example shows how a client can specify the authentication chain, `myAuthChain`:
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.
308
293
309
-
+
310
294
For example, if the OAuth 2.0 provider is configured for the `/customers` realm, then use `/oauth2/customers/access_token`.
295
+
--
311
296
312
297
`/oauth2/device`::
313
298
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.
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
+
--
320
305
321
306
`/oauth2/token/revoke`::
322
307
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:
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
+
--
337
323
338
324
`/oauth2/tokeninfo`::
339
325
Endpoint __not__ defined in RFC 6749, used to validate tokens, and to retrieve information, such as scopes.
340
-
341
326
+
327
+
--
342
328
The `/oauth2/tokeninfo` endpoint takes an HTTP GET on `/oauth2/tokeninfo?access_token=token-id`, and returns information about the token.
343
329
344
-
+
345
330
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.
346
331
347
-
+
348
332
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.
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
+
--
414
395
415
396
`/oauth2/introspect`::
416
397
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
-
418
398
+
399
+
--
419
400
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
+
421
402
[open]
422
403
====
423
404
@@ -446,12 +427,10 @@ Subject of the token.
446
427
Issuer of the token.
447
428
448
429
====
449
-
+
430
+
450
431
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.
451
432
452
-
+
453
433
The following example demonstrates the `/oauth2/introspect` endpoint with basic authorization:
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
-
493
468
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__.
494
470
495
471
[#openam-oauth2-client]
496
472
==== OpenAM as OAuth 2.0 Client and Resource Server Solution
Copy file name to clipboardExpand all lines: openam/modules/admin-guide/pages/chap-radius.adoc
+6-17Lines changed: 6 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ For more information on the RADIUS Server service configuration properties, see
171
171
172
172
. Create a file named `radius.properties` in the current working directory. The file consists of the following key-value pairs:
173
173
+
174
-
174
+
--
175
175
* `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.
176
176
177
177
* `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
180
180
181
181
* `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.
182
182
183
-
+
184
183
The following is an example `radius.properties` file:
185
-
+
186
184
187
185
[source, console]
188
186
----
@@ -191,10 +189,9 @@ host=openam.example.com
191
189
port=1812
192
190
show-traffic=true
193
191
----
194
-
192
+
--
195
193
. 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:
@@ -220,7 +217,6 @@ Packet From openam.example.com:1812
220
217
==== Solutions to Common RADIUS Server Service Issues
221
218
222
219
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
-
--
224
220
225
221
Client Cannot Connect::
226
222
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
359
355
Configuration Is Correct but Authentication Fails::
360
356
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:
361
357
+
362
-
358
+
--
363
359
* The `org.forgerock.openam.radius.server.spi.handlers.AcceptAllHandler` handler always returns an `Access-Accept` packet, indicating successful authentication for all requests.
364
360
365
361
* The `org.forgerock.openam.radius.server.spi.handlers.RejectAllHandler` handler always returns an `Access-Reject` packet, indicating failed authentication for all requests.
366
362
367
-
+
368
363
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
-
+
370
364
371
365
[source, console]
372
366
----
@@ -378,30 +372,25 @@ Packet from TestClient:
378
372
- NAS_IP_ADDRESS : /127.0.0.1
379
373
- NAS_PORT : 0
380
374
----
381
-
+
382
-
+
375
+
383
376
This is followed by:
384
-
+
385
377
386
378
[source, console]
387
379
----
388
380
WARNING:
389
381
Packet to TestClient:
390
382
ACCESS_ACCEPT [1]
391
383
----
392
-
+
393
-
+
384
+
394
385
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
+
--
395
387
396
388
Authentication Always Succeeds, Even With a Bad Password::
397
389
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.
398
390
399
391
+
400
392
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.
0 commit comments