Skip to content

updates from beta feedback #1148

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

Open
wants to merge 23 commits into
base: main-3.0-dev
Choose a base branch
from

Conversation

carl-adams-planet
Copy link
Contributor

@carl-adams-planet carl-adams-planet commented May 23, 2025

Improvements from beta feedback

  • Improve ergonomics of the "login" CLI. Mostly, it is now printing warnings when it is detected that the environment may influence behavior in unexpected way.
  • Plumb the "profile copy" command into the planet CLI so that users have a way to create profiles.
  • Many doc updates. Doc updates cross-reference pending changes to docs.planet.com

@carl-adams-planet carl-adams-planet marked this pull request as ready for review May 28, 2025 23:34
Copy link
Contributor

@tbarsballe tbarsballe left a comment

Choose a reason for hiding this comment

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

I've left a few comments on the doc updates, though I had a bit of trouble following the flow of everything without the structure of the mkdocs site. I think it might be easier to review after it's been deployed.

All the actual functional changes look good to me.

OAuth2 defines many different ways to obtain access tokens, and a full discussion
is beyond the scope of this SDK user guide. Please refer to the [Resources](#resources)
below for more information. Planet broadly divides OAuth2 use cases into
user-interactive and machine-to-machine use cases, as described in this guide.
Copy link
Contributor

Choose a reason for hiding this comment

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

In line with the 3 bullets in the prior section, it might be nice to have separate links here to the applicable auth-dev-* subsections for user access and M2M access, especially since the headings of those subsections don't quite line up 1-1 with the bullets, e.g. OAuth2 user access tokens vs ****

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like the idea. The current example doc organization in the "auth-dev" pages do not align to this axis of auth protocol flavor. Rather, those (mostly) ladder from least to most complex for the client developer, with API keys somewhat shoved to the bottom.

I'll see what links and org I can change that makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I have this in the next set of edits. (Not yet pushed)

- Highest priority is given to command-line arguments. This applies
only to `planet` CLI use, since programmatic use of the SDK bypasses the CLI program.
Configuration persisted by the `planet` CLI is saved to configuration files
(below).
Copy link
Contributor

Choose a reason for hiding this comment

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

This could do with some rewording since the section is more SDK focused. Something along the lines of:

Highest priority is given to arguments passed to the Auth class (when using the SDK) or via the command line (when using the CLI)

Or maybe just change the L1 heading if you're meaning for this to be equally applicable to both? I believe we use "Planet Python Client" (or just "Planet Client") as the collective term for both SDK + CLI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll take your wording.

and applications built using the SDK.

Applications built using the SDK may be configured to bypass home directory
profile and session storage, if this better suits the needs of the application.
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be nice to link out to how to do this from here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in next push.

|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| **`PL_AUTH_PROFILE`** | Specify a custom CLI managed auth client profile by name. This must name a valid CLI managed profile or an error will occur. |
| **`PL_AUTH_CLIENT_ID`** | Specify an OAuth2 M2M client ID. `PL_AUTH_CLIENT_SECRET` must also be specified, or this will be ignored. |
| **`PL_AUTH_CLIENT_SECRET`** | Specify an OAuth2 M2M client secret. `PL_AUTH_CLIENT_ID` must also be specified, or this will be ignored. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we link to how to obtain these anywhere? I saw the link for API key instructions above, but not one for M2M clients (I know this is kinda under-construction so of this is an add it later thing, that's fine)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I have links a couple places now.

There is a couple different tag-teams going on now: I want to link back to docs.planet.com for some things that are not SDK specific (like client registration), and at least two things are in a "under construction" state: PL APIs do not actually accept M2M tokens yet (SH APIs do). We have no self-serve process for registering interactive clients, despite the relative verbosity space that case occupies in the guide (That's because it's just more complex.)

@@ -1,377 +1,8 @@
# Client Authentication Guide
Copy link
Contributor

Choose a reason for hiding this comment

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

I was viewing this raw to get a better handle on what was left after the refactoring, and noticed the title format is different than the other files under this dir, e.g.:

---
title: Python SDK API Reference
---

Not sure if that needs to be fixed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed that one. I don't know where that copy pasta came from.

I already removed that from a later draft, however.

"Confidential" OAuth2 client configurations, and needs to be documented
here.
See [Client Authentication Overview](../../auth/auth-overview) for a general
overview, and [Authentication with the SDK](../../auth/auth-sdk) for a primer
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's a little redundant, but we should probably spell out an overview of what, e.g.
"for a general overview of authentication with the Planet Client in general"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Will adjust.

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.

2 participants