Repository navigation
feat: list spaces for a connection whose API key is held in a parameter - #264
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…API key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chosen id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ackage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # octopus-server/src/main/java/octopus/teamcity/server/connection/OctopusConnectionUiData.java # octopus-server/src/main/resources/buildServerResources/spacePicker.jsp
…ection from TeamCity Switching a step's connection clears the stored space id, since an id only identifies a space on one Octopus server. The connection form now gets the connection being edited from TeamCity's oauthConnectionBean instead of trying request parameter names. The picker's loader copes with missing markup and a script that fails to load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-picker-parameter-key # Conflicts: # e2e/src/test/java/octopus/teamcity/e2e/test/OctopusSpacePickerUiTest.java # octopus-server/src/main/java/octopus/teamcity/server/spaces/OctopusSpacesController.java # octopus-server/src/main/resources/buildServerResources/spacePicker.jsp
…eter-key # Conflicts: # e2e/src/test/java/octopus/teamcity/e2e/test/OctopusSpacePickerUiTest.java # octopus-server/src/main/java/octopus/teamcity/server/connection/OctopusConnectionUiData.java # octopus-server/src/main/resources/buildServerResources/js/spacePicker.js # octopus-server/src/main/resources/buildServerResources/spacePicker.jsp
…there Resolving the parameter sends its value, which can be a password the user cannot read, to the connection's URL. Requiring RUN_BUILD keeps the picker within what a build step could already do, and each lookup is logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…project A build finds its connection from its own project, so a build configuration from any other project would pair a URL and key no build would use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nding whitespace Validation and the space picker both trim the reference, so builds now use the same value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
APErebus
approved these changes
Oct 15, 2026
APErebus
left a comment
Contributor
There was a problem hiding this comment.
Couple of minor nits, but looks good
…topusSpacesController.java Co-authored-by: Alastair Pitts <APErebus@users.noreply.github.com>
…topusSpacesController.java
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of DPT-3630 (Renaming an Octopus space breaks TeamCity configurations that name it). Stacked on #263.
Why
A connection can take its API key from a
%parameter%instead of storing it. Until now the picker told those connections to type the space name. It now resolves the reference the way a build would, and lists spaces when the parameter has a value outside a build.How the reference is resolved
On a step form the reference is resolved against that step's build configuration, so a key defined on the build configuration is found. On the connection form, which has no build configuration, it is resolved against the project. A parameter that only gets a value when a build runs (for example, set by an earlier step) can't be resolved at edit time. The picker says so, quoting the reference, and typing the name still works.
Security
The build configuration is named by the request, and its parameters can hold the API key. So it is used only when the caller also holds
EDIT_PROJECTon its project, not just on the project whose form they're editing. A missing build configuration and one the caller can't edit get the same message, so the endpoint can't be used to find out which build configurations exist. Both cases have tests.Notes
OIDC connections still get a message to type the name; that follows in the next PR.
OctopusSpacePickerUiTest(now 6 cases, including a password parameter and one that only resolves during a build) passes locally against the real containers.🤖 Generated with Claude Code