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

adding doc re: base paths #4242

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

anaxceron
Copy link
Collaborator

Describe your pull request here: Addressing Issue 3361

List the file(s) included in this PR: cli-using-integrating-apiml.md, cli-authentication-mechanisms.md

After creating the PR, follow the instructions in the comments.

Signed-off-by: anaxceron <[email protected]>
@anaxceron anaxceron added area: cli This issue is related to Zowe Command Line Interface (CLI) release: V3 Zowe V3 content review: sme Needs review by an SME labels Mar 18, 2025
@anaxceron anaxceron self-assigned this Mar 18, 2025
Copy link

😺 Thank you for creating this PR! To publish your content to Zowe Docs, follow these steps.

  • Add the label review: sme if an SME needs to check your content.
  • Identify your content topic with a label. (Examples: area: apiml, area: cli, area: install and config, etc.)
  • Specify the major Zowe release(s) for your content. (Examples: release: V1, release: V2, release: V3)
    • If adding content that needs to be removed from V3 documentation, add the V3 N/A tag.
  • Link any Doc Issues related to this PR.
  • Fix broken links found in your content areas.
  • Notify the SME to review this PR (if applicable).
  • Merge to the master branch if your PR updates content that is on the live site. Merge to docs-staging if your PR updates content for a future release.

Copy link

github-actions bot commented Mar 18, 2025

@github-actions github-actions bot temporarily deployed to pull request March 18, 2025 20:36 Inactive
zowe auth login apiml --host <APIML Host> --port <APIML Port> --cert-file <PEM Public Certificate Path> --cert-key-file <PEM Private Certificate Path> --base-profile <profile_name>
```

- Use `--base-profile` when issuing commands with API ML **[is "with" correct here?]**:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adam-wolfe - please respond

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct, but I would remove --base-path since that should be specified in a profile.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For creating v1 profiles from the commandline, those commands should include --base-path as an option. Using --base-path for other commands is only necessary if you are running Zowe CLI without V1 profiles or a team config. Which could be the case for a user running commands using something like Jenkins where everything is scripted.

Signed-off-by: anaxceron <[email protected]>
@github-actions github-actions bot temporarily deployed to pull request March 19, 2025 18:22 Inactive
@@ -139,24 +236,23 @@ Use the following steps to specify a base path with Zowe V1 profiles:
```
Commands issued with this profile are routed through the layer to access an appropriate z/OSMF instance.


## Accessing multiple services with SSO
### Accessing multiple services with SSO

If multiple services are registered to the API Mediation Layer at your site, Zowe CLI lets you access the services with Single Sign-on (SSO). Log in once to conveniently access all available services.

When you are logged in, supply the `--base-path` option on commands for each service. Ensure that you do not provide username, password, host, or port directly on your service commands or profiles. Supplying those options causes the CLI to ignore the token in your base profile and directly access the service. You might need to remove those options from existing profiles to use SSO.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while you could "supply the --base-path option on commands for each service", it would be much more convenient to set the basePath property for each service profile so you don't have to specify this option on every command.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hold on. Not sure how V1 profiles handle this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awaiting further instruction on this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that the basePath property is supported in V1 profiles. So, it would make more sense to tell people to put the base path in their service profiles for either V1 profiles or team config depending on what they are using.

Side question: Do we still document V1 profile usage in V3 docs?


If multiple services are registered to the API Mediation Layer at your site, Zowe CLI lets you access the services with Single Sign-on (SSO). Log in once to conveniently access all available services.

When you are logged in, supply the `--base-path` option on commands for each service. Ensure that you do not provide username, password, host, or port directly on your service commands or profiles. Supplying those options causes the CLI to ignore the token in your base profile and directly access the service. You might need to remove those options from existing profiles to use SSO.

For information about registering an API service at your site, see [Developing for API Mediation Layer](../extend/extend-apiml/onboard-overview).

## Accessing services through SSO and a service not through API ML
### Accessing services through SSO and a service not through API ML

A scenario might exist where you log in to API ML with SSO, but you also want to access a different service *directly*.

To access the SSO-enabled services, log in and issue commands with the `--base-path` and `--base-profile` options. The token from your base profile is used for authentication. Remember, your command or service profile must *not* contain username, password, host, or port.
Copy link
Collaborator

@adam-wolfe adam-wolfe Mar 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, we would probably want to tell users that, for services they are accessing through the mediation layer, they should set basePath in their service profile. The --base-profile option is a bit trickier, since we don't support it as a profile property (but --base-profile does work as a command option). However, since profile nesting is not an option for V1 profiles, specifying the --base-profile as a command option may be the best option.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but wouldn't it be kinder to instruct folks to use commands? I'm wondering if it's more complicated to have someone edit a config file and then still have to use the baseprofile option. I mean, if you're already using one option, wouldn't it be easier to use two? (that's a legit question, not rhetorical)


A scenario might exist where you log in to API ML with SSO, but you also want to access a different service *directly*.

To access the SSO-enabled services, log in and issue commands with the `--base-path` and `--base-profile` options. The token from your base profile is used for authentication. Remember, your command or service profile must *not* contain username, password, host, or port.

To access the other service directly &mdash; and circumvent API ML &mdash; supply all connection information (username, password, host, and port) on a command or service profile. When you explicitly supply the username and password in a command or service profile, the CLI always uses that connection information instead of the API ML token.

## Accessing services through SSO and a service through API ML but not SSO
### Accessing services through SSO and a service through API ML but not SSO

You might want to access multiple services with SSO, but also access a service through API ML that is not SSO-enabled.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is for the next line ("To perform SSO for the first ..."). I would suggest that the user puts the basePath in the relevant service profile. The --base-profile option is necessary for dealing with multiple API ML gateways using V1 profiles.


### Specifying a base path with Zowe V1 profiles
#### Specifying a base path with Zowe V1 profiles
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to remove V1 profile documentation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't know. I'll bring this up as a parking lot to the team in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cli This issue is related to Zowe Command Line Interface (CLI) release: V3 Zowe V3 content review: sme Needs review by an SME
Projects
Status: New Issues
Development

Successfully merging this pull request may close these issues.

3 participants