Skip to content

Resolve auth endpoint dynamically and use dedicated pods#438

Merged
majd merged 6 commits into
mainfrom
feature/bag_endpoints
Feb 16, 2026
Merged

Resolve auth endpoint dynamically and use dedicated pods#438
majd merged 6 commits into
mainfrom
feature/bag_endpoints

Conversation

@majd

@majd majd commented Feb 16, 2026

Copy link
Copy Markdown
Owner

This pull request introduces support for "pod"-specific App Store endpoints, enhancing how requests are routed and authenticated. The main changes involve fetching the correct authentication endpoint dynamically, propagating the "pod" information through the login flow, and updating all relevant requests to use the pod-specific host if available. Comprehensive tests have been added for these new behaviors.

Pod-aware endpoint support:

  • Added a new Bag method to the AppStore interface and its implementation, which fetches endpoint definitions (including the authentication endpoint) from the App Store "bag" service. (pkg/appstore/appstore.go, pkg/appstore/appstore_bag.go, [1] [2]
  • Updated the login flow to use the authentication endpoint from the bag and to extract and store the "pod" value from login responses in the Account struct. (cmd/auth.go, pkg/appstore/account.go, pkg/appstore/appstore_login.go, [1] [2] [3] [4] [5] [6] [7] [8] [9]

Pod-specific request routing:

  • Modified download, version metadata, and list versions requests to use a pod-specific host if the Account.Pod field is set, ensuring requests are routed correctly for users assigned to a particular pod. (pkg/appstore/appstore_download.go, pkg/appstore/appstore_get_version_metadata.go, pkg/appstore/appstore_list_versions.go, [1] [2] [3] [4]

Testing improvements:

  • Added new tests for the Bag method, as well as tests to verify that pod-specific hosts are used in download, get version metadata, and list versions requests. (pkg/appstore/appstore_bag_test.go, pkg/appstore/appstore_download_test.go, pkg/appstore/appstore_get_version_metadata_test.go, pkg/appstore/appstore_list_versions_test.go, [1] [2] [3] [4]
  • Enhanced login tests to check for correct handling of the "pod" value in the Account struct and in request routing. (pkg/appstore/appstore_login_test.go, [1] [2] [3] [4] [5]

@majd majd linked an issue Feb 16, 2026 that may be closed by this pull request
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.

Support Anisette auth

1 participant