mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 21:27:31 +00:00
misc: added oidc auth to access token trusted Ips
This commit is contained in:
@@ -51,6 +51,12 @@ export const identityAccessTokenDALFactory = (db: TDbClient) => {
|
|||||||
`${TableName.IdentityKubernetesAuth}.identityId`
|
`${TableName.IdentityKubernetesAuth}.identityId`
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
|
.leftJoin(TableName.IdentityOidcAuth, (qb) => {
|
||||||
|
qb.on(`${TableName.Identity}.authMethod`, db.raw("?", [IdentityAuthMethod.OIDC_AUTH])).andOn(
|
||||||
|
`${TableName.Identity}.id`,
|
||||||
|
`${TableName.IdentityOidcAuth}.identityId`
|
||||||
|
);
|
||||||
|
})
|
||||||
.select(selectAllTableCols(TableName.IdentityAccessToken))
|
.select(selectAllTableCols(TableName.IdentityAccessToken))
|
||||||
.select(
|
.select(
|
||||||
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityUniversalAuth).as("accessTokenTrustedIpsUa"),
|
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityUniversalAuth).as("accessTokenTrustedIpsUa"),
|
||||||
@@ -58,6 +64,7 @@ export const identityAccessTokenDALFactory = (db: TDbClient) => {
|
|||||||
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityAwsAuth).as("accessTokenTrustedIpsAws"),
|
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityAwsAuth).as("accessTokenTrustedIpsAws"),
|
||||||
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityAzureAuth).as("accessTokenTrustedIpsAzure"),
|
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityAzureAuth).as("accessTokenTrustedIpsAzure"),
|
||||||
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityKubernetesAuth).as("accessTokenTrustedIpsK8s"),
|
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityKubernetesAuth).as("accessTokenTrustedIpsK8s"),
|
||||||
|
db.ref("accessTokenTrustedIps").withSchema(TableName.IdentityOidcAuth).as("accessTokenTrustedIpsOidc"),
|
||||||
db.ref("name").withSchema(TableName.Identity)
|
db.ref("name").withSchema(TableName.Identity)
|
||||||
)
|
)
|
||||||
.first();
|
.first();
|
||||||
@@ -71,7 +78,8 @@ export const identityAccessTokenDALFactory = (db: TDbClient) => {
|
|||||||
doc.accessTokenTrustedIpsGcp ||
|
doc.accessTokenTrustedIpsGcp ||
|
||||||
doc.accessTokenTrustedIpsAws ||
|
doc.accessTokenTrustedIpsAws ||
|
||||||
doc.accessTokenTrustedIpsAzure ||
|
doc.accessTokenTrustedIpsAzure ||
|
||||||
doc.accessTokenTrustedIpsK8s
|
doc.accessTokenTrustedIpsK8s ||
|
||||||
|
doc.accessTokenTrustedIpsOidc
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new DatabaseError({ error, name: "IdAccessTokenFindOne" });
|
throw new DatabaseError({ error, name: "IdAccessTokenFindOne" });
|
||||||
|
|||||||
Reference in New Issue
Block a user