Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

remove debug logs, update comments, other nitpicks

x84255d1b26e0
diff --git a/backend/src/server/routes/v1/app-connection-routers/teamcity-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/teamcity-connection-router.ts
index a47a530be4..c794c36ca3 100644
--- a/backend/src/server/routes/v1/app-connection-routers/teamcity-connection-router.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/teamcity-connection-router.ts
@@ -21,7 +21,7 @@ export const registerTeamCityConnectionRouter = async (server: FastifyZodProvide
updateSchema: UpdateTeamCityConnectionSchema
});
- // The below endpoints are not exposed and for Infisical App use
+ // The following endpoints are for internal Infisical App use only and not part of the public API
server.route({
method: "GET",
url: `/:connectionId/projects`,
@@ -51,12 +51,9 @@ export const registerTeamCityConnectionRouter = async (server: FastifyZodProvide
},
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
- console.log("HIT1");
const { connectionId } = req.params;
const projects = await server.services.appConnection.teamcity.listProjects(connectionId, req.permission);
- console.log(projects);
-
return projects;
}
});
diff --git a/backend/src/services/secret-sync/teamcity/teamcity-sync-fns.ts b/backend/src/services/secret-sync/teamcity/teamcity-sync-fns.ts
index 685351ef5d..523bce9a5a 100644
--- a/backend/src/services/secret-sync/teamcity/teamcity-sync-fns.ts
+++ b/backend/src/services/secret-sync/teamcity/teamcity-sync-fns.ts
@@ -11,6 +11,7 @@ import {
} from "@app/services/secret-sync/teamcity/teamcity-sync-types";
// Note: Most variables won't be returned with a value due to them being a "password" type (starting with "env.").
+// TeamCity API returns empty string for password-type variables for security reasons.
const listTeamCityVariables = async ({ instanceUrl, accessToken, project, buildConfig }: TTeamCityListVariables) => {
const { data } = await request.get<TTeamCityListVariablesResponse>(
buildConfig
@@ -28,7 +29,7 @@ const listTeamCityVariables = async ({ instanceUrl, accessToken, project, buildC
return Object.fromEntries(
data.property.map((variable) => [
variable.name.startsWith("env.") ? variable.name.substring(4) : variable.name,
- { ...variable, value: variable.value || "" } // This will almost always be empty string
+ { ...variable, value: variable.value || "" } // Password values will be empty strings from the API for security
])
);
};
@@ -72,7 +73,7 @@ const deleteTeamCityVariable = async ({
return request.delete(
buildConfig
? `${instanceUrl}/app/rest/buildTypes/${buildConfig}/parameters/${key}`
- : `${instanceUrl}/app/rest/projects/${project}/parameters/${key}`,
+ : `${instanceUrl}/app/rest/projects/id:${project}/parameters/${key}`,
{
headers: {
Authorization: `Bearer ${accessToken}`
@@ -162,7 +163,7 @@ export const TeamCitySyncFns = {
} catch (error) {
throw new SecretSyncError({
error,
- secretKey: variable.name
+ secretKey: key
});
}
}
diff --git a/docs/integrations/app-connections/teamcity.mdx b/docs/integrations/app-connections/teamcity.mdx
index 9fc6bff899..2b7d7f587a 100644
--- a/docs/integrations/app-connections/teamcity.mdx
+++ b/docs/integrations/app-connections/teamcity.mdx
@@ -35,7 +35,7 @@ Infisical supports connecting to TeamCity using an Access Token to securely sync
You should now see your newly created token in the list of access tokens.
![TeamCity Token Created](/images/app-connections/teamcity/teamcity-token-created.png)
</Step>
- <Step title="Setup Vercel Connection in Infisical">
+ <Step title="Setup TeamCity Connection in Infisical">
<Tabs>
<Tab title="Infisical UI">
1. Navigate to App Connections
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx
index 23b5b75014..f4fdf526b3 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx
@@ -105,6 +105,7 @@ export const TeamCitySyncFields = () => {
onChange(selectedOption?.id ?? "");
}}
options={buildTypes}
+ isClearable={true}
placeholder="Select a build configuration..."
getOptionLabel={(option) => option.name}
getOptionValue={(option) => option.id}