planet-auth 2.3.0__tar.gz → 2.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. {planet_auth-2.3.0 → planet_auth-2.3.1}/PKG-INFO +1 -1
  2. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/changelog.md +4 -0
  3. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/storage_utils.py +47 -7
  4. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth.egg-info/PKG-INFO +1 -1
  5. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/cli/main.py +1 -1
  6. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/cli/oauth_cmd.py +1 -1
  7. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/cli/planet_legacy_auth_cmd.py +1 -1
  8. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/cli/util.py +21 -1
  9. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/test_oidc_request_authenticator.py +8 -1
  10. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/test_storage_utils_file_backed_json_object.py +12 -5
  11. planet_auth-2.3.1/version.txt +1 -0
  12. planet_auth-2.3.0/version.txt +0 -1
  13. {planet_auth-2.3.0 → planet_auth-2.3.1}/.github/actions/python-build-env-setup/action.yml +0 -0
  14. {planet_auth-2.3.0 → planet_auth-2.3.1}/.github/actions/version-dot-buildnum-fetch/action.yml +0 -0
  15. {planet_auth-2.3.0 → planet_auth-2.3.1}/.github/actions/version-dot-buildnum-generate/action.yml +0 -0
  16. {planet_auth-2.3.0 → planet_auth-2.3.1}/.github/workflows/release-build.yml +0 -0
  17. {planet_auth-2.3.0 → planet_auth-2.3.1}/.github/workflows/release-orchestrate.yml +0 -0
  18. {planet_auth-2.3.0 → planet_auth-2.3.1}/.github/workflows/release-publish.yml +0 -0
  19. {planet_auth-2.3.0 → planet_auth-2.3.1}/.github/workflows/test.yml +0 -0
  20. {planet_auth-2.3.0 → planet_auth-2.3.1}/.gitignore +0 -0
  21. {planet_auth-2.3.0 → planet_auth-2.3.1}/.readthedocs.yaml +0 -0
  22. {planet_auth-2.3.0 → planet_auth-2.3.1}/CONTRIBUTING.md +0 -0
  23. {planet_auth-2.3.0 → planet_auth-2.3.1}/DESIGN.md +0 -0
  24. {planet_auth-2.3.0 → planet_auth-2.3.1}/DEVELOPMENT.md +0 -0
  25. {planet_auth-2.3.0 → planet_auth-2.3.1}/LICENSE +0 -0
  26. {planet_auth-2.3.0 → planet_auth-2.3.1}/MANIFEST.in +0 -0
  27. {planet_auth-2.3.0 → planet_auth-2.3.1}/README.md +0 -0
  28. {planet_auth-2.3.0 → planet_auth-2.3.1}/RELEASE.md +0 -0
  29. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/api-planet-auth-config-injection.md +0 -0
  30. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/api-planet-auth-utils.md +0 -0
  31. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/api-planet-auth.md +0 -0
  32. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/built-ins.md +0 -0
  33. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/cli-plauth.md +0 -0
  34. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/configuration.md +0 -0
  35. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/custom_theme/partials/header.html +0 -0
  36. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/design.md +0 -0
  37. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/__init__.py +0 -0
  38. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client/oauth/initialize-client-lib-in-memory.py +0 -0
  39. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client/oauth/initialize-client-lib-on-disk-profile.py +0 -0
  40. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client/oauth/make-oauth-authenticated-httpx-request.py +0 -0
  41. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client/oauth/make-oauth-authenticated-requests-request.py +0 -0
  42. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client/oauth/perform-oauth-device-login.py +0 -0
  43. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client/oauth/perform-oauth-initial-login-2.py +0 -0
  44. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client/oauth/perform-oauth-initial-login.py +0 -0
  45. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client/planet-legacy/make-legacy-authenticated-requests-request.py +0 -0
  46. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client/planet-legacy/perform-legacy-initial-login.py +0 -0
  47. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/oauth-auth-code-grant-confidential-client-pubkey.json +0 -0
  48. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/oauth-auth-code-grant-confidential-client-secret.json +0 -0
  49. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/oauth-auth-code-grant-public-client.json +0 -0
  50. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/oauth-client-credentials-grant-confidential-client-pubkey.json +0 -0
  51. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/oauth-client-credentials-grant-confidential-client-secret.json +0 -0
  52. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/oauth-client-validator.json +0 -0
  53. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/oauth-password-grant-confidential-client-pubkey.json +0 -0
  54. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/oauth-password-grant-confidential-client-secret.json +0 -0
  55. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/oauth-password-grant-public-client.json +0 -0
  56. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/auth-client-config/planet-legacy.json +0 -0
  57. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/cli/embed-plauth-click.py +0 -0
  58. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/service/fastapi.py +0 -0
  59. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/service/flask--connexion.py +0 -0
  60. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/service/flask--oidc-multi-issuer--local-and-remote-validation.py +0 -0
  61. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/service/flask--oidc-multi-issuer--local-only-validation.py +0 -0
  62. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/snippets/auth-client-context-from-saved-profile.py +0 -0
  63. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/snippets/auth-client-context-oauth-direct.py +0 -0
  64. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples/snippets/auth-client-context-pl-legacy-direct.py +0 -0
  65. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples-cli.md +0 -0
  66. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples-client.md +0 -0
  67. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples-installation.md +0 -0
  68. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/examples-service.md +0 -0
  69. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/hooks/mkdocs_hooks.py +0 -0
  70. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/img/logo-color-dark-150.png +0 -0
  71. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/img/logo-color-dark.svg +0 -0
  72. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/img/logo-color-light-150.png +0 -0
  73. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/img/logo-color-light.svg +0 -0
  74. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/img/logo-color.svg +0 -0
  75. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/img/logo-white-150.png +0 -0
  76. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/img/logo-white.svg +0 -0
  77. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/img/logo.svg +0 -0
  78. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/index.md +0 -0
  79. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/library-overview.md +0 -0
  80. {planet_auth-2.3.0 → planet_auth-2.3.1}/docs/readme.md +0 -0
  81. {planet_auth-2.3.0 → planet_auth-2.3.1}/mkdocs.yml +0 -0
  82. {planet_auth-2.3.0 → planet_auth-2.3.1}/noxfile.py +0 -0
  83. {planet_auth-2.3.0 → planet_auth-2.3.1}/pyproject.toml +0 -0
  84. {planet_auth-2.3.0 → planet_auth-2.3.1}/setup.cfg +0 -0
  85. {planet_auth-2.3.0 → planet_auth-2.3.1}/setup.py +0 -0
  86. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/__init__.py +0 -0
  87. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/auth.py +0 -0
  88. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/auth_client.py +0 -0
  89. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/auth_exception.py +0 -0
  90. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/constants.py +0 -0
  91. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/credential.py +0 -0
  92. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/internal/__init__.py +0 -0
  93. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/logging/__init__.py +0 -0
  94. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/logging/auth_logger.py +0 -0
  95. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/logging/events.py +0 -0
  96. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/none/__init__.py +0 -0
  97. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/none/noop_auth.py +0 -0
  98. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/__init__.py +0 -0
  99. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/__init__.py +0 -0
  100. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/api_client.py +0 -0
  101. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/authorization_api_client.py +0 -0
  102. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/device_authorization_api_client.py +0 -0
  103. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/discovery_api_client.py +0 -0
  104. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/introspect_api_client.py +0 -0
  105. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/jwks_api_client.py +0 -0
  106. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/oidc_request_auth.py +0 -0
  107. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/revocation_api_client.py +0 -0
  108. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/token_api_client.py +0 -0
  109. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/api_clients/userinfo_api_client.py +0 -0
  110. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_client.py +0 -0
  111. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_client_default_authenticators.py +0 -0
  112. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_client_with_client_pubkey.py +0 -0
  113. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_client_with_client_secret.py +0 -0
  114. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_clients/__init__.py +0 -0
  115. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_clients/auth_code_flow.py +0 -0
  116. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_clients/client_credentials_flow.py +0 -0
  117. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_clients/client_validator.py +0 -0
  118. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_clients/device_code_flow.py +0 -0
  119. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/auth_clients/resource_owner_flow.py +0 -0
  120. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/multi_validator.py +0 -0
  121. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/oidc_credential.py +0 -0
  122. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/request_authenticator.py +0 -0
  123. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/resources/__init__.py +0 -0
  124. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/resources/callback_acknowledgement.html +0 -0
  125. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/token_validator.py +0 -0
  126. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/oidc/util.py +0 -0
  127. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/planet_legacy/__init__.py +0 -0
  128. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/planet_legacy/auth_client.py +0 -0
  129. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/planet_legacy/legacy_api_key.py +0 -0
  130. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/planet_legacy/request_authenticator.py +0 -0
  131. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/py.typed +0 -0
  132. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/request_authenticator.py +0 -0
  133. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/static_api_key/__init__.py +0 -0
  134. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/static_api_key/auth_client.py +0 -0
  135. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/static_api_key/request_authenticator.py +0 -0
  136. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/static_api_key/static_api_key.py +0 -0
  137. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth/util.py +0 -0
  138. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth.egg-info/SOURCES.txt +0 -0
  139. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth.egg-info/dependency_links.txt +0 -0
  140. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth.egg-info/entry_points.txt +0 -0
  141. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth.egg-info/requires.txt +0 -0
  142. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth.egg-info/top_level.txt +0 -0
  143. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_config_injection/__init__.py +0 -0
  144. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_config_injection/builtins_provider.py +0 -0
  145. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_config_injection/py.typed +0 -0
  146. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/__init__.py +0 -0
  147. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/builtins.py +0 -0
  148. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/__init__.py +0 -0
  149. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/cli/__init__.py +0 -0
  150. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/cli/jwt_cmd.py +0 -0
  151. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/cli/options.py +0 -0
  152. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/cli/profile_cmd.py +0 -0
  153. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/commands/cli/prompts.py +0 -0
  154. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/constants.py +0 -0
  155. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/internal/__init__.py +0 -0
  156. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/plauth_factory.py +0 -0
  157. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/plauth_user_config.py +0 -0
  158. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/profile.py +0 -0
  159. {planet_auth-2.3.0 → planet_auth-2.3.1}/src/planet_auth_utils/py.typed +0 -0
  160. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/__init__.py +0 -0
  161. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/__init__.py +0 -0
  162. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/live_service/oauth_client_credentials_client_secret.sops.json +0 -0
  163. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/live_service/oauth_client_credentials_pubkey_literal.sops.json +0 -0
  164. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/live_service/oauth_pkce_auth_code.json +0 -0
  165. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/live_service/oauth_pkce_auth_code_client_secret.sops.json +0 -0
  166. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/live_service/oauth_pkce_auth_code_pubkey.sops.json +0 -0
  167. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/live_service/oauth_resource_owner.sops.json +0 -0
  168. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/live_service/oauth_resource_owner_client_pubkey.sops.json +0 -0
  169. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/live_service/oauth_resource_owner_client_secret.sops.json +0 -0
  170. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/auth_code.json +0 -0
  171. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/auth_code_pubkey.json +0 -0
  172. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/auth_code_secret.json +0 -0
  173. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/client_credentials_client_secret.json +0 -0
  174. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/client_credentials_pubkey_file.json +0 -0
  175. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/client_credentials_pubkey_literal.json +0 -0
  176. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/client_validator.json +0 -0
  177. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/device_auth.json +0 -0
  178. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/device_auth_pubkey.json +0 -0
  179. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/device_auth_secret.json +0 -0
  180. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/invalid_client_config.json +0 -0
  181. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/none.json +0 -0
  182. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/planet_legacy.json +0 -0
  183. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/planet_legacy_with_apikey.json +0 -0
  184. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/resource_owner.json +0 -0
  185. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/resource_owner_pubkey.json +0 -0
  186. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/resource_owner_secret.json +0 -0
  187. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/static_api_key.json +0 -0
  188. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/auth_client_configs/utest/static_api_key_with_key.json +0 -0
  189. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/README.txt +0 -0
  190. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/base_test_credential.json +0 -0
  191. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/invalid_test_credential.json +0 -0
  192. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair1_priv.test_pem +0 -0
  193. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair1_priv_nopassword.test_pem +0 -0
  194. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair1_pub.test_pem +0 -0
  195. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair1_pub_jwk.json +0 -0
  196. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair2_priv.test_pem +0 -0
  197. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair2_priv_nopassword.test_pem +0 -0
  198. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair2_pub.test_pem +0 -0
  199. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair2_pub_jwk.json +0 -0
  200. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair3_priv_nopassword.test_pem +0 -0
  201. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair3_pub.test_pem +0 -0
  202. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair3_pub_jwk.json +0 -0
  203. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair4_priv_jwk.json +0 -0
  204. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair4_priv_nopassword.test_pem +0 -0
  205. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair4_pub.test_pem +0 -0
  206. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/keypair4_pub_jwk.json +0 -0
  207. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/oidc_test_credential_jwt_tokens_no_lifespan_augmented.json +0 -0
  208. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/oidc_test_credential_jwt_tokens_no_lifespan_non_augmented.json +0 -0
  209. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/oidc_test_credential_jwt_tokens_with_lifespan_augmented.json +0 -0
  210. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/oidc_test_credential_jwt_tokens_with_lifespan_non_augmented.json +0 -0
  211. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/oidc_test_credential_opaque_tokens_no_lifespan_augmented.json +0 -0
  212. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/oidc_test_credential_opaque_tokens_no_lifespan_non_augmented.json +0 -0
  213. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/oidc_test_credential_opaque_tokens_with_lifespan_augmented.json +0 -0
  214. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/oidc_test_credential_opaque_tokens_with_lifespan_non_augmented.json +0 -0
  215. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/planet_legacy_test_credential.json +0 -0
  216. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/static_api_key_test_credential.json +0 -0
  217. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/keys/static_api_key_test_credential_2.json +0 -0
  218. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/data/resources/authorization_callback_acknowledgement.html +0 -0
  219. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/live_service/__init__.py +0 -0
  220. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/live_service/auth/__init__.py +0 -0
  221. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/live_service/auth/auth_clients/__init__.py +0 -0
  222. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/live_service/auth/auth_clients/oidc/__init__.py +0 -0
  223. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/live_service/auth/auth_clients/oidc/test_all_oidc_clients_live.py +0 -0
  224. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/__init__.py +0 -0
  225. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/__init__.py +0 -0
  226. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/__init__.py +0 -0
  227. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/none/__init__.py +0 -0
  228. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/none/test_noop_auth.py +0 -0
  229. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/__init__.py +0 -0
  230. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/__init__.py +0 -0
  231. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/test_api_client_base.py +0 -0
  232. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/test_authorization_api_client.py +0 -0
  233. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/test_device_authorization_api_client.py +0 -0
  234. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/test_discovery_api_client.py +0 -0
  235. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/test_introspect_api_client.py +0 -0
  236. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/test_jwks_api_client.py +0 -0
  237. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/test_revocation_api_client.py +0 -0
  238. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/test_token_api_client.py +0 -0
  239. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/api_clients/test_userinfo_api_client.py +0 -0
  240. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/auth_clients/__init__.py +0 -0
  241. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/auth_clients/test_auth_code.py +0 -0
  242. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/auth_clients/test_client_credentials.py +0 -0
  243. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/auth_clients/test_client_validator.py +0 -0
  244. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/auth_clients/test_device_code.py +0 -0
  245. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/auth_clients/test_resource_owner.py +0 -0
  246. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/test_multi_validator.py +0 -0
  247. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/test_oidc_auth_client_baseclass.py +0 -0
  248. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/test_oidc_token_credential.py +0 -0
  249. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/oidc/test_token_validator.py +0 -0
  250. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/planet_legacy/__init__.py +0 -0
  251. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/planet_legacy/test_legacy_api_auth_client.py +0 -0
  252. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/planet_legacy/test_legacy_api_key_credential.py +0 -0
  253. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/planet_legacy/test_planet_legacy_request_authenticator.py +0 -0
  254. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/static_api_key/__init__.py +0 -0
  255. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/static_api_key/test_static_api_key_auth_client.py +0 -0
  256. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/static_api_key/test_static_api_key_credential.py +0 -0
  257. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/static_api_key/test_static_api_key_request_authenticator.py +0 -0
  258. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/auth_clients/test_auth_client_baseclass.py +0 -0
  259. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/test_auth.py +0 -0
  260. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/test_auth_exception.py +0 -0
  261. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/test_auth_is_initialized.py +0 -0
  262. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/test_auth_logger.py +0 -0
  263. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/test_auth_utils.py +0 -0
  264. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/test_request_authenticator.py +0 -0
  265. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/test_resources.py +0 -0
  266. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/unit/auth/util.py +0 -0
  267. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth/util.py +0 -0
  268. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/__init__.py +0 -0
  269. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/data/auth_client_configs/utest/invalid_client_config.json +0 -0
  270. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/data/auth_client_configs/utest/static_api_key.json +0 -0
  271. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/__init__.py +0 -0
  272. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/auth_utils/__init__.py +0 -0
  273. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/auth_utils/builtins_test_impl.py +0 -0
  274. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/auth_utils/test_builtins.py +0 -0
  275. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/auth_utils/test_plauth_factory.py +0 -0
  276. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/auth_utils/test_profile.py +0 -0
  277. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/commands/__init__.py +0 -0
  278. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/commands/plauth_cli/__init__.py +0 -0
  279. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/commands/plauth_cli/test_cli_cmds.py +0 -0
  280. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/unit/commands/plauth_cli/test_utils.py +0 -0
  281. {planet_auth-2.3.0 → planet_auth-2.3.1}/tests/test_planet_auth_utils/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: planet-auth
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Planet Auth Utility Code
5
5
  Author-email: Carl Adams <carl.adams@planet.com>
6
6
  License-Expression: Apache-2.0
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.3.1 - 2025-12-10
4
+ - Fix a bug where sops protected files would be rewritten without preserving
5
+ their sops protection.
6
+
3
7
  ## 2.3.0 - 2025-10-20
4
8
  - Improve the user experience around old stale sessions that appear to be
5
9
  initialized, but are actually expired. This is done by providing the new
@@ -19,6 +19,7 @@ import stat
19
19
  import subprocess
20
20
  import time
21
21
  from abc import ABC, abstractmethod
22
+ from enum import Enum
22
23
  from typing import Optional, Dict, Any
23
24
 
24
25
  from planet_auth.auth_exception import AuthException
@@ -96,9 +97,15 @@ class ObjectStorageProvider(ABC):
96
97
  class _SOPSAwareFilesystemObjectStorageProvider(ObjectStorageProvider):
97
98
  """
98
99
  Storage provider geared around backing a single object in a single file
99
- with paths take from the root of the local file system.
100
+ with paths taken from the root of the local file system.
100
101
  """
101
102
 
103
+ _STORAGE_TYPE_KEY = "___SOPSAwareFilesystemObjectStorageProvider__storage_type"
104
+
105
+ class _StorageType(Enum):
106
+ PLAINTEXT = "plaintext"
107
+ SOPS = "sops"
108
+
102
109
  def __init__(self, root: Optional[pathlib.Path] = None):
103
110
  if root:
104
111
  self._storage_root = root
@@ -116,13 +123,18 @@ class _SOPSAwareFilesystemObjectStorageProvider(ObjectStorageProvider):
116
123
  return obj_path
117
124
 
118
125
  @staticmethod
119
- def _is_sops_path(file_path):
126
+ def _is_sops_path(file_path: pathlib.Path) -> bool:
120
127
  # TODO: Could be ".json.sops", or ".sops.json", depending on file
121
128
  # level or field level encryption, respectively. We currently
122
129
  # only look for and support field level encryption in json
123
130
  # files with a ".sops.json" suffix.
124
131
  return bool(file_path.suffixes == [".sops", ".json"])
125
132
 
133
+ @staticmethod
134
+ def _filter_write_object(data: dict) -> dict:
135
+ final_data = {k: v for k, v in data.items() if not (isinstance(k, str) and k.startswith("__"))}
136
+ return final_data
137
+
126
138
  @staticmethod
127
139
  def _read_json(file_path: pathlib.Path):
128
140
  auth_logger.debug(msg="Loading JSON data from file {}".format(file_path))
@@ -137,7 +149,7 @@ class _SOPSAwareFilesystemObjectStorageProvider(ObjectStorageProvider):
137
149
 
138
150
  @staticmethod
139
151
  def _write_json(file_path: pathlib.Path, data: dict):
140
- auth_logger.debug(msg="Writing JSON data to file {}".format(file_path))
152
+ auth_logger.debug(msg="Writing JSON data to cleartext file {}".format(file_path))
141
153
  with open(file_path, mode="w", encoding="UTF-8") as file_w:
142
154
  os.chmod(file_path, stat.S_IREAD | stat.S_IWRITE)
143
155
  _no_none_data = {key: value for key, value in data.items() if value is not None}
@@ -155,26 +167,54 @@ class _SOPSAwareFilesystemObjectStorageProvider(ObjectStorageProvider):
155
167
  # ['sops', '-e', '--input-type', 'json', '--output-type',
156
168
  # 'json', '--output', file_path, '/dev/stdin'],
157
169
  # stdin=data_f)
158
- auth_logger.debug(msg="Writing JSON data to SOPS encrypted file {}".format(file_path))
159
170
  _SOPSAwareFilesystemObjectStorageProvider._write_json(file_path, data)
171
+ auth_logger.debug(msg="Writing JSON data to SOPS encrypted file {}".format(file_path))
160
172
  subprocess.check_call(["sops", "-e", "--input-type", "json", "--output-type", "json", "-i", file_path])
161
173
 
162
174
  @staticmethod
163
175
  def _load_file(file_path: pathlib.Path) -> dict:
164
176
  if _SOPSAwareFilesystemObjectStorageProvider._is_sops_path(file_path):
165
177
  new_data = _SOPSAwareFilesystemObjectStorageProvider._read_json_sops(file_path)
178
+ new_data[_SOPSAwareFilesystemObjectStorageProvider._STORAGE_TYPE_KEY] = (
179
+ _SOPSAwareFilesystemObjectStorageProvider._StorageType.SOPS.value
180
+ )
166
181
  else:
167
182
  new_data = _SOPSAwareFilesystemObjectStorageProvider._read_json(file_path)
183
+ new_data[_SOPSAwareFilesystemObjectStorageProvider._STORAGE_TYPE_KEY] = (
184
+ _SOPSAwareFilesystemObjectStorageProvider._StorageType.PLAINTEXT.value
185
+ )
168
186
 
169
187
  return new_data
170
188
 
189
+ @staticmethod
190
+ def _do_sops(file_path: pathlib.Path, data: dict) -> bool:
191
+ if _SOPSAwareFilesystemObjectStorageProvider._is_sops_path(file_path):
192
+ return True
193
+ if (
194
+ data
195
+ and data.get(_SOPSAwareFilesystemObjectStorageProvider._STORAGE_TYPE_KEY)
196
+ == _SOPSAwareFilesystemObjectStorageProvider._StorageType.SOPS.value
197
+ ):
198
+ auth_logger.warning(msg=f"Data sourced from SOPS being written cleartext to the file {file_path}.")
199
+ # Upgrading to SOPS would be great, but also problematic.
200
+ # The problem is that if we are writing to SOPS we should use a
201
+ # SOPS file name so that we know we should read it as a SOPS file
202
+ # later. We can't change the name here because the caller would
203
+ # not know what we did, and may not be able to find the object
204
+ # later.
205
+
206
+ return False
207
+
171
208
  @staticmethod
172
209
  def _save_file(file_path: pathlib.Path, data: dict):
173
210
  file_path.parent.mkdir(parents=True, exist_ok=True)
174
- if _SOPSAwareFilesystemObjectStorageProvider._is_sops_path(file_path):
175
- _SOPSAwareFilesystemObjectStorageProvider._write_json_sops(file_path, data)
211
+ do_sops = _SOPSAwareFilesystemObjectStorageProvider._do_sops(file_path, data)
212
+ write_data = _SOPSAwareFilesystemObjectStorageProvider._filter_write_object(data)
213
+
214
+ if do_sops:
215
+ _SOPSAwareFilesystemObjectStorageProvider._write_json_sops(file_path, write_data)
176
216
  else:
177
- _SOPSAwareFilesystemObjectStorageProvider._write_json(file_path, data)
217
+ _SOPSAwareFilesystemObjectStorageProvider._write_json(file_path, write_data)
178
218
 
179
219
  def load_obj(self, key: ObjectStorageProvider_KeyType) -> dict:
180
220
  obj_filepath = self._obj_filepath(key)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: planet-auth
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Planet Auth Utility Code
5
5
  Author-email: Carl Adams <carl.adams@planet.com>
6
6
  License-Expression: Apache-2.0
@@ -227,7 +227,7 @@ def cmd_plauth_login(
227
227
  )
228
228
  print("Login succeeded.") # Errors should throw.
229
229
 
230
- post_login_cmd_helper(override_auth_context=override_auth_context, use_sops=sops, prompt_pre_selection=yes)
230
+ post_login_cmd_helper(override_auth_context=override_auth_context, use_sops_opt=sops, prompt_pre_selection=yes)
231
231
 
232
232
 
233
233
  cmd_plauth.add_command(cmd_oauth)
@@ -128,7 +128,7 @@ def cmd_oauth_login(
128
128
  extra=login_extra,
129
129
  )
130
130
  print("Login succeeded.") # Errors should throw.
131
- post_login_cmd_helper(override_auth_context=current_auth_context, use_sops=sops, prompt_pre_selection=yes)
131
+ post_login_cmd_helper(override_auth_context=current_auth_context, use_sops_opt=sops, prompt_pre_selection=yes)
132
132
 
133
133
 
134
134
  @cmd_oauth.command("refresh")
@@ -81,7 +81,7 @@ def cmd_pllegacy_login(ctx, username, password, sops, yes):
81
81
  password=password,
82
82
  )
83
83
  print("Login succeeded.") # Errors should throw.
84
- post_login_cmd_helper(override_auth_context=current_auth_context, use_sops=sops, prompt_pre_selection=yes)
84
+ post_login_cmd_helper(override_auth_context=current_auth_context, use_sops_opt=sops, prompt_pre_selection=yes)
85
85
 
86
86
 
87
87
  @cmd_pllegacy.command("print-api-key")
@@ -17,14 +17,18 @@ import functools
17
17
  import json
18
18
  from typing import List, Optional
19
19
 
20
+ import planet_auth.logging.auth_logger
20
21
  import planet_auth
21
22
  from planet_auth.constants import AUTH_CONFIG_FILE_SOPS, AUTH_CONFIG_FILE_PLAIN
23
+ from planet_auth.storage_utils import _SOPSAwareFilesystemObjectStorageProvider
22
24
  from planet_auth.util import custom_json_class_dumper
23
25
 
24
26
  from planet_auth_utils.builtins import Builtins
25
27
  from planet_auth_utils.profile import Profile
26
28
  from .prompts import prompt_and_change_user_default_profile_if_different
27
29
 
30
+ auth_logger = planet_auth.logging.auth_logger.getAuthLogger()
31
+
28
32
 
29
33
  def monkeypatch_hide_click_cmd_options(cmd, hide_options: List[str]):
30
34
  """
@@ -68,7 +72,7 @@ def print_obj(obj):
68
72
 
69
73
 
70
74
  def post_login_cmd_helper(
71
- override_auth_context: planet_auth.Auth, use_sops, prompt_pre_selection: Optional[bool] = None
75
+ override_auth_context: planet_auth.Auth, use_sops_opt, prompt_pre_selection: Optional[bool] = None
72
76
  ):
73
77
  override_profile_name = override_auth_context.profile_name()
74
78
  if not override_profile_name:
@@ -88,6 +92,22 @@ def post_login_cmd_helper(
88
92
  # helping CLI commands, we can be more opinionated about what is to
89
93
  # be done.
90
94
 
95
+ # If the profile was read from sops, selected sops even if wasn't an
96
+ # explict command line option.
97
+ use_sops = use_sops_opt
98
+ if not use_sops:
99
+ # Here in the CLI we can assume that the default storage provider
100
+ # _SOPSAwareFilesystemObjectStorageProvider is being used. Unlike general
101
+ # library use, we do not support caller provided custom storage providers
102
+ # in the CLI tools at this time.
103
+ _config_data = override_auth_context.auth_client().config().data() or {}
104
+ if (
105
+ _config_data.get(_SOPSAwareFilesystemObjectStorageProvider._STORAGE_TYPE_KEY)
106
+ == _SOPSAwareFilesystemObjectStorageProvider._StorageType.SOPS.value
107
+ ):
108
+ auth_logger.debug(msg="Implicitly selecting SOPS based on data originating from SOPS protected storage.")
109
+ use_sops = True
110
+
91
111
  # Don't clobber built-in profiles.
92
112
  if not Builtins.is_builtin_profile(override_profile_name):
93
113
  if use_sops:
@@ -73,6 +73,13 @@ class RefreshingOidcRequestAuthenticatorTest(unittest.TestCase):
73
73
  self.tmp_dir = tempfile.TemporaryDirectory()
74
74
  self.tmp_dir_path = pathlib.Path(self.tmp_dir.name)
75
75
 
76
+ @staticmethod
77
+ def _filter_spdata(data: dict) -> dict:
78
+ # Storage providers are known to add "__" keys for their own use.
79
+ # These should not be considered part of the general data.
80
+ filtered_data = {k: v for k, v in data.items() if not (isinstance(k, str) and k.startswith("__"))}
81
+ return filtered_data
82
+
76
83
  def under_test_happy_path(self):
77
84
  credential_path = self.tmp_dir_path / "refreshing_oidc_authenticator_test_token__with_refresh.json"
78
85
  test_credential = self.mock_auth_login_and_command_initialize(
@@ -485,7 +492,7 @@ class RefreshingOidcRequestAuthenticatorTest(unittest.TestCase):
485
492
  # It should not be necessary to simulate an API call for everything to be set
486
493
  current_credential_data = under_test._credential.data()
487
494
  self.assertNotEqual(current_credential_data, initial_credential_data)
488
- self.assertEqual(current_credential_data, sideband_credential.data())
495
+ self.assertEqual(self._filter_spdata(current_credential_data), sideband_credential.data())
489
496
  self.assertEqual(under_test._token_body, sideband_credential.access_token())
490
497
  self.assertNotEqual(0, under_test._refresh_at)
491
498
  self.assertNotEqual(0, under_test._credential._load_time)
@@ -88,6 +88,13 @@ class TestFileBackedJsonObject(unittest.TestCase):
88
88
  # This seems to help.
89
89
  os.environ["TZ"] = "UTC"
90
90
 
91
+ @staticmethod
92
+ def _filter_spdata(data: dict) -> dict:
93
+ # Storage providers are known to add "__" keys for their own use.
94
+ # These should not be considered part of the general data.
95
+ filtered_data = {k: v for k, v in data.items() if not (isinstance(k, str) and k.startswith("__"))}
96
+ return filtered_data
97
+
91
98
  def test_set_data_asserts_valid(self):
92
99
  under_test = Credential(data=None, file_path=None)
93
100
  with self.assertRaises(FileBackedJsonObjectException):
@@ -129,14 +136,14 @@ class TestFileBackedJsonObject(unittest.TestCase):
129
136
  # Load works when we have a valid file
130
137
  under_test.set_path(tdata_resource_file_path("keys/base_test_credential.json"))
131
138
  under_test.load()
132
- self.assertEqual({"test_key": "test_value"}, under_test.data())
139
+ self.assertEqual({"test_key": "test_value"}, self._filter_spdata(under_test.data()))
133
140
 
134
141
  # A subsequent failed load should throw, but leave the data unchanged.
135
142
  under_test.set_path(tdata_resource_file_path("keys/FILE_DOES_NOT_EXIST.json"))
136
143
  with self.assertRaises(FileNotFoundError):
137
144
  under_test.load()
138
145
 
139
- self.assertEqual({"test_key": "test_value"}, under_test.data())
146
+ self.assertEqual({"test_key": "test_value"}, self._filter_spdata(under_test.data()))
140
147
 
141
148
  def test_load_file_not_found(self):
142
149
  under_test = Credential(data=None, file_path=tdata_resource_file_path("keys/FILE_DOES_NOT_EXIST.json"))
@@ -166,7 +173,7 @@ class TestFileBackedJsonObject(unittest.TestCase):
166
173
  under_test = Credential(data=None, file_path=tdata_resource_file_path("keys/base_test_credential.json"))
167
174
  self.assertIsNone(under_test.data())
168
175
  under_test.lazy_load()
169
- self.assertEqual({"test_key": "test_value"}, under_test.data())
176
+ self.assertEqual({"test_key": "test_value"}, self._filter_spdata(under_test.data()))
170
177
 
171
178
  # if the path is invalid, it should error.
172
179
  under_test = Credential(data=None, file_path=tdata_resource_file_path("keys/FILE_DOES_NOT_EXIST.json"))
@@ -204,7 +211,7 @@ class TestFileBackedJsonObject(unittest.TestCase):
204
211
  under_test = Credential(data=None, file_path=tdata_resource_file_path("keys/base_test_credential.json"))
205
212
  self.assertIsNone(under_test.data())
206
213
  under_test.lazy_reload()
207
- self.assertEqual({"test_key": "test_value"}, under_test.data())
214
+ self.assertEqual({"test_key": "test_value"}, self._filter_spdata(under_test.data()))
208
215
 
209
216
  # if the path is invalid, it should error.
210
217
  under_test = Credential(data=None, file_path=tdata_resource_file_path("keys/FILE_DOES_NOT_EXIST.json"))
@@ -299,7 +306,7 @@ class TestFileBackedJsonObject(unittest.TestCase):
299
306
  under_test.save()
300
307
  test_reader = Credential(data=None, file_path=test_path)
301
308
  test_reader.load()
302
- self.assertEqual(test_data, test_reader.data())
309
+ self.assertEqual(test_data, self._filter_spdata(test_reader.data()))
303
310
 
304
311
  def test_getters_setters(self):
305
312
  test_path = pathlib.Path("/test/test_credential.json")
@@ -0,0 +1 @@
1
+ 2.3.1
@@ -1 +0,0 @@
1
- 2.3.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes