Prevent OAuth Clients from Using Implicit Grant
Use a system property to avoid the use of the implicit grant type.
The OAuth implicit grant was created to overcome a limitation between browsers and client-side applications (for example, single page applications) prior to the widespread adoption of Cross Origin Resource Sharing (CORS). Specifically, browsers' same-origin policy blocked the request that exchanged the OAuth authorization code with the OAuth access token. Since CORS support is universal, OAuth clients don’t need to use the implicit grant, and implicit grant type requests fail by default.
Client IDs listed in the glide.oauth.clients.allowed.for.implicit.grant property can continue using the implicit grant type. Ensure that the property doesn’t exist in the System Properties [sys_properties] table, or exists but doesn’t contain a value.
More information
| Attribute | Description |
|---|---|
| Configuration name | glide.oauth.clients.allowed.for.implicit.grant |
| Configuration type | System Properties (/sys_properties_list.do) |
| Data type | String |
| Recommended value | <blank> |
| Default value | <blank> |
| Fallback value | <blank> |
| Category | API and web service |
| Security risk |
|
| Functional impact |
The implicit grant type request fails out of the box. Any OAuth clients with the implicit grant type that aren’t added to the property fail by default. If you haven't defined any OAuth clients that use the implicit grant type, there is no impact. 注:
Changing an OAuth client to a different grant type may require code or configuration changes in the client application (outside of the ServiceNow platform). |
| Dependencies and prerequisites | None |