api-layer icon indicating copy to clipboard operation
api-layer copied to clipboard

Personal Access Tokens do not work with scheme: zoweJwt

Open dkelosky opened this issue 11 months ago • 6 comments

Describe the bug Personal Access Tokens do not work with scheme: zoweJwt

Steps to Reproduce

  1. Obtain a personal access token (PAT)
  2. Verify that the PAT works when accessing a z/OSMF REST API
  3. Verify that the PAT works with a service configured to use scheme: httpBasicPassTicket
  4. Verify that the PAT is not accepted by a service configured to use scheme: zoweJwt

Expected behavior PAT should work for services using zoweJwt as well as x509 and safidt schemes.

Screenshots If applicable, add screenshots to help explain your problem.

Logs If applicable, add server logs collected at the time of your problem.

Details

  • Version and build number :Version 2.14.4 build # 161

REST API client (in case of REST API issue):

  • Technology: curl
  • OS: Windows 10

Additional context Add any other context about the problem here.

Willingness to help Willing

https://github.com/zowe/api-layer/wiki/Issue-management

dkelosky avatar Mar 21 '24 19:03 dkelosky

Just a note it can't work withthe x509 scheme, but the zoweJwt is necessary to validate.

balhar-jakub avatar Mar 21 '24 19:03 balhar-jakub

Just a note it can't work withthe x509 scheme, but the zoweJwt is necessary to validate.

Is this because a service configured with scheme x509 must be forwarded the certificate info from a client certificate?

dkelosky avatar Mar 21 '24 20:03 dkelosky

Yes.

balhar-jakub avatar Mar 22 '24 06:03 balhar-jakub

So similarly, if you use the auth/login and get a JWT, you cannot use that to access services which have scheme x509?

dkelosky avatar Apr 02 '24 11:04 dkelosky

It's similar but for x509 it's known and accepted limitation and we don't allow this schema within conformance.

For Personal Access Tokens this behavior is bug.

balhar-jakub avatar Apr 03 '24 07:04 balhar-jakub

Thanks - I didn't realize this, but see it clearly outlined in the conformance program and here:

authentication.scheme The value of this parameter specifies a service authentication scheme. The following schemes that participate in single sign on are supported by the API Gateway: zoweJwt, safIdt, httpBasicPassTicket. Two additional schemes that do not properly participate but may be relevant are bypass, and x509.

dkelosky avatar Apr 03 '24 11:04 dkelosky