Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API ML mapping features do not work in ACF2 environment #2946

Closed
JirkaAichler opened this issue Jun 6, 2023 · 12 comments
Closed

API ML mapping features do not work in ACF2 environment #2946

JirkaAichler opened this issue Jun 6, 2023 · 12 comments
Assignees
Labels
do not keep To keep upvotes or activity is needed enhancement New feature or request Priority: Medium

Comments

@JirkaAichler
Copy link
Contributor

JirkaAichler commented Jun 6, 2023

Describe the bug
Certain API ML features, specifically API ML mapping features require ZWESVUSR to have a password enabled.

https://docs.zowe.org/stable/extend/extend-apiml/authentication-for-apiml-services/#authentication-with-client-certificate

This is considered insecure on z/OS and it breaks basic security rules on the platform. The server user (STC user) must be always protected ACID.

It is not possible to set passwords for STC users in certain security environments. It would also mean that the server user password would be expiring according to environmental policies which can easily lead to the service being unavailable.

Suggestion:
API ML should be authenticated by some other method (such as a certificate) when communicating with ZSS.

@JirkaAichler JirkaAichler added bug Verified defect in functionality new New issue that has not been worked on yet Security labels Jun 6, 2023
@EvaJavornicka EvaJavornicka added enhancement New feature or request clarification Issue is being clarified in the discussion with the creator of the issue Priority: High and removed bug Verified defect in functionality new New issue that has not been worked on yet labels Jun 6, 2023
@balhar-jakub balhar-jakub changed the title API ML mapping features do not work for protected Zowe server user API ML mapping features do not work in ACF2 environment Sep 4, 2023
@JirkaAichler
Copy link
Contributor Author

JirkaAichler commented Sep 7, 2023

ZSS accepts certificates since Zowe v2.10.0. This feature is currently undocumented.

More details about client certificates:

You need a client certificate that has the public key signed by the root certificate authority of ZSS server certificate.
The mechanism for mapping certificate to user is R_USERMAP; so, you need the client certificate added to desired user as personal in your esm.

@balhar-jakub balhar-jakub self-assigned this Sep 7, 2023
@balhar-jakub
Copy link
Member

So what exactly would this change mean fo the Zowe users?
For usage of OIDC they will need to create a Zowe user which will have the client certificate of the API Gateway mapped?

@balhar-jakub
Copy link
Member

Ok, it seems that this issue is linked: zowe/zowe-install-packaging#3570

@EvaJavornicka EvaJavornicka added 23PI4 and removed clarification Issue is being clarified in the discussion with the creator of the issue labels Sep 11, 2023
@azarrafa
Copy link

Hello,
Is there a solution for ZWESVUSR to not have a password enabled ? because security wouldn't accept a STC with a password.
How can we authenticate using a certificate instead ?
thanks

@balhar-jakub balhar-jakub removed their assignment Oct 13, 2023
@JirkaAichler
Copy link
Contributor Author

Hello, Is there a solution for ZWESVUSR to not have a password enabled ? because security wouldn't accept a STC with a password. How can we authenticate using a certificate instead ? thanks

No there is currently no workaround for API ML mapping features. API ML must be updated to use certificates instead of pass tickets.

@balhar-jakub
Copy link
Member

The current situation seems to be complex. The problem is actually within the ZSS and specifically in a way how ACF2 handles authentication and impersonification. It seems that there may be less secure workarounds but the actual solutions depend on the ACF2 team. I will follow-up with the ACF2 teams on what are their plans with respect to fix.

@JirkaAichler
Copy link
Contributor Author

What exactly needs to be fixed on the ACF2 side? It seems that ACF2 strictly follows the security rules and this is the correct approach.

@balhar-jakub
Copy link
Member

I would ask Joe Devlin, this is what I got when asking during the PI Planning call.

@balhar-jakub
Copy link
Member

The issue as understood within the ZSS seems to be documented here: zowe/zss#615 where I am not certain whether and under what specific circumstances is it possible to run ZSS under user without password. @JoeNemo do you know whether it's already possible?

If it's possible and the only remaining issue is in the way API Mediation Layer connects to the ZSS, then we will fix it directly, but I believe that the last answer I got was that there is something in ACF2 that needs to be changed before the ZSS works fully and properly without password for the user running the ZSS.

@EvaJavornicka EvaJavornicka added the clarification Issue is being clarified in the discussion with the creator of the issue label Nov 13, 2023
@balhar-jakub
Copy link
Member

To clarify we need to actually run the ZSS within the local environment. Test that the mapping functionality works when the user authenticates e.g. via basic authentication with username and password.

When this succeeds test whether client certificate is accepted and the ACF2 properly maps the user.

@achmelo
Copy link
Member

achmelo commented Dec 22, 2023

ZSS is probably using R_usermap for client cert auth zowe/zss#584

@balhar-jakub balhar-jakub self-assigned this Jan 8, 2024
@EvaJavornicka EvaJavornicka added Priority: Medium and removed Priority: High clarification Issue is being clarified in the discussion with the creator of the issue labels Jan 15, 2024
@balhar-jakub
Copy link
Member

We have implemented for 2.14 alternative route that doesn't require ZSS and as such works properly. The ZSS focused route is therefore being downgraded in importance and as such is of medium priority now.

@balhar-jakub balhar-jakub added the do not keep To keep upvotes or activity is needed label Jan 15, 2024
@balhar-jakub balhar-jakub closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not keep To keep upvotes or activity is needed enhancement New feature or request Priority: Medium
Projects
Development

No branches or pull requests

5 participants