Skip to content

[WIP] DEVORTEX-3094#4

Open
ashevel-smartling wants to merge 31 commits into
3.4.x-Smartlingfrom
DEVORTEX-3094
Open

[WIP] DEVORTEX-3094#4
ashevel-smartling wants to merge 31 commits into
3.4.x-Smartlingfrom
DEVORTEX-3094

Conversation

@ashevel-smartling
Copy link
Copy Markdown

No description provided.

abn and others added 29 commits November 16, 2017 07:00
Fix regression causing service calls to clients not configured as
bearer-only to fail. Fix a session corruption bug when both the
session cookie and an authorization bearer token are present
on a request.
…ntials', when client_id is missing

grant_type refresh_token throws 'invalid_client_credentials', when
client_id is not a part of openid-connect/token request
When token is renewed on POST request to
'/auth/realms/master/protocol/openid-connect/token', RHEL-SSO 7.1 throws
back error as below.
{"error":"unauthorized_client","error_description":"UNKNOWN_CLIENT:
Client was not identified by any client authenticator"}

This is fixed by adding client_id to the http request getting token
renewed.
This adds the build POM and assembly XMLs from the downstream repo, with some
improvements to the POM. Notably, jsonpath-maven-plugin and PME replace the
overly hacky ant string replacement logic for package.json

As this is only intended for building the product, there aren't community and
product profiles.

Since the product build pom depends on mvn properties, I have included
prod-arguments.json from KEYCLOAK-6909 in this same commit. This will allow a
build pipeline to substitute the appropriate values for things like the NPM
registry.

The community build is unaffected by this change. All the new files are kept in
a seperate product/ directory.
The PR for KEYCLOAK-6909 (keycloak#121) was modified to put the new stuff in a
subdirectory. I omitted to check that the pom would actually build from this
new location, and it doesn't.

In a couple places I've added a `../` so that the paths point to the repo root
again, so the build actually works now. Sorry for not checking this before.
Further to KEYCLOAK-7193 and KEYCLOAK-6909.

prod-arguments.json defines a couple PME jsonUpdate paths. It turns out these
paths are resolved relative to the pom location, not the current working
directory, so ../ must be added to compensate for the maven stuff being located
in a subdirectory.
Note: We no longer need nsp, once npm audit replaced it
While validateGrant, a refresh_token may be validated
as access_token (easy to do with bearer-only api)

This fix add a type checking on attribute 'typ' on the token.
Three kinds of token can be validated:
- Bearer: access_token
- Refresh: refresh_token
- ID: id_token
The `next` callback was not being passed in this instance of `keycloak.accessDenied` (as opposed to the similar call on L27). This means that implementations cannot easily handle the error using standard express error handling mechanisms.
@ashevel-smartling ashevel-smartling changed the base branch from master to 3.4.x-Smartling August 13, 2021 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.