Merge pull request #3874 from Infisical/remove-certauth-join

Remove cert auth left join
This commit is contained in:
Maidul Islam
2025-06-27 20:41:58 -04:00
committed by GitHub

View File

@@ -45,11 +45,6 @@ export const identityAccessTokenDALFactory = (db: TDbClient) => {
.leftJoin(TableName.IdentityOidcAuth, `${TableName.Identity}.id`, `${TableName.IdentityOidcAuth}.identityId`)
.leftJoin(TableName.IdentityTokenAuth, `${TableName.Identity}.id`, `${TableName.IdentityTokenAuth}.identityId`)
.leftJoin(TableName.IdentityJwtAuth, `${TableName.Identity}.id`, `${TableName.IdentityJwtAuth}.identityId`)
.leftJoin(
TableName.IdentityTlsCertAuth,
`${TableName.Identity}.id`,
`${TableName.IdentityTlsCertAuth}.identityId`
)
.select(selectAllTableCols(TableName.IdentityAccessToken))
.select(
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityUniversalAuth).as("accessTokenTrustedIpsUa"),
@@ -66,7 +61,6 @@ export const identityAccessTokenDALFactory = (db: TDbClient) => {
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityTokenAuth).as("accessTokenTrustedIpsToken"),
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityJwtAuth).as("accessTokenTrustedIpsJwt"),
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityLdapAuth).as("accessTokenTrustedIpsLdap"),
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityTlsCertAuth).as("accessTokenTrustedIpsTlsCert"),
db.ref("name").withSchema(TableName.Identity)
)
.first();
@@ -86,7 +80,7 @@ export const identityAccessTokenDALFactory = (db: TDbClient) => {
trustedIpsAccessTokenAuth: doc.accessTokenTrustedIpsToken,
trustedIpsAccessJwtAuth: doc.accessTokenTrustedIpsJwt,
trustedIpsAccessLdapAuth: doc.accessTokenTrustedIpsLdap,
trustedIpsAccessTlsCertAuth: doc.accessTokenTrustedIpsTlsCert
trustedIpsAccessTlsCertAuth: []
};
} catch (error) {
throw new DatabaseError({ error, name: "IdAccessTokenFindOne" });