[keycloak-user] custom REST endpoints with authenticated access

Svyatoslav Babych s.babych at dataclaritycorp.com
Wed Feb 6 11:06:37 EST 2019


Hi All,


For our application we have implemented custom REST endpoints with authenticated access check like:

this.auth = new AppAuthManager().authenticateBearerToken(session);
if (auth == null) {
            throw new NotAuthorizedException("Authorization header must be provided");
}
It works great for all requests except situation when master realm admin tries to call this endpoint at different realm (not his own)
It works at /realms/master/{endpoint}, but doesn't for /realms/{realm}/{endpoint}
Could you please help me wit this ? master admin for access uses: master realm, *admin-cli* client and has *admin* role assigned.

Thank you,

Regards
Svyat


Svyatoslav Babych | Senior Solution Architect, Technical team Lead
s.babych at dataclaritycorp.com
DataClarity Corporation | www.dataclaritycorp.com
Facebook | Twitter | LinkedIn
Confidentiality Notice: The information in this email and any attachments is confidential or proprietary and should be treated and marked as “Confidential” DataClarity communication. If you are not the intended recipient of this email, any review, disclosure, copying, or distribution of it including any attachments is strictly prohibited and may be unlawful. If you have received this email in error, please notify the sender and immediately and permanently delete it and destroy any copies. Any information contained in this email is subject to the terms and conditions expressed in any applicable agreement.


More information about the keycloak-user mailing list