Skip to content

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

add token end point verification

Maidul Islam21d22a0dfbd8
diff --git a/backend/src/ee/services/oidc/oidc-config-service.ts b/backend/src/ee/services/oidc/oidc-config-service.ts
index f7b537d4c6..974bf4b9e4 100644
--- a/backend/src/ee/services/oidc/oidc-config-service.ts
+++ b/backend/src/ee/services/oidc/oidc-config-service.ts
@@ -581,6 +581,12 @@ export const oidcConfigServiceFactory = ({
if (jwksUri) {
await blockLocalAndPrivateIpAddresses(jwksUri);
}
+ if (tokenEndpoint) {
+ await blockLocalAndPrivateIpAddresses(tokenEndpoint);
+ }
+ if (userinfoEndpoint) {
+ await blockLocalAndPrivateIpAddresses(userinfoEndpoint);
+ }
const updateQuery: TOidcConfigsUpdate = {
allowedEmailDomains,
@@ -667,6 +673,12 @@ export const oidcConfigServiceFactory = ({
if (jwksUri) {
await blockLocalAndPrivateIpAddresses(jwksUri);
}
+ if (tokenEndpoint) {
+ await blockLocalAndPrivateIpAddresses(tokenEndpoint);
+ }
+ if (userinfoEndpoint) {
+ await blockLocalAndPrivateIpAddresses(userinfoEndpoint);
+ }
const { encryptor } = await kmsService.createCipherPairWithDataKey({
type: KmsDataKey.Organization,
@@ -739,6 +751,8 @@ export const oidcConfigServiceFactory = ({
});
}
await blockLocalAndPrivateIpAddresses(oidcCfg.jwksUri);
+ await blockLocalAndPrivateIpAddresses(oidcCfg.tokenEndpoint);
+ await blockLocalAndPrivateIpAddresses(oidcCfg.userinfoEndpoint);
issuer = new OpenIdIssuer({
issuer: oidcCfg.issuer,
authorization_endpoint: oidcCfg.authorizationEndpoint,