mirror of
https://github.com/logto-io/logto.git
synced 2025-04-14 23:11:31 -05:00
fix(core,console): make SAML related log visible in audit log listing page (#6962)
This commit is contained in:
parent
b88a07598e
commit
5321d60e9b
4 changed files with 10 additions and 5 deletions
|
@ -7,6 +7,7 @@ import {
|
|||
type interaction,
|
||||
type LogKeyUnknown,
|
||||
type jwtCustomizer,
|
||||
type saml,
|
||||
} from '@logto/schemas';
|
||||
import { conditional, conditionalArray } from '@silverhand/essentials';
|
||||
import { sql } from '@silverhand/slonik';
|
||||
|
@ -24,6 +25,7 @@ export type AllowedKeyPrefix =
|
|||
| token.Type
|
||||
| interaction.Prefix
|
||||
| jwtCustomizer.Prefix
|
||||
| saml.Prefix
|
||||
| typeof LogKeyUnknown;
|
||||
|
||||
type LogCondition = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { LogResult, token, interaction, LogKeyUnknown, jwtCustomizer } from '@logto/schemas';
|
||||
import { LogResult, token, interaction, LogKeyUnknown, jwtCustomizer, saml } from '@logto/schemas';
|
||||
import type { Log } from '@logto/schemas';
|
||||
import { pickDefault } from '@logto/shared/esm';
|
||||
|
||||
|
@ -50,6 +50,7 @@ describe('logRoutes', () => {
|
|||
token.Type.RevokeToken,
|
||||
interaction.prefix,
|
||||
jwtCustomizer.prefix,
|
||||
saml.prefix,
|
||||
LogKeyUnknown,
|
||||
],
|
||||
});
|
||||
|
@ -61,6 +62,7 @@ describe('logRoutes', () => {
|
|||
token.Type.RevokeToken,
|
||||
interaction.prefix,
|
||||
jwtCustomizer.prefix,
|
||||
saml.prefix,
|
||||
LogKeyUnknown,
|
||||
],
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Logs, interaction, token, LogKeyUnknown, jwtCustomizer } from '@logto/schemas';
|
||||
import { Logs, interaction, token, LogKeyUnknown, jwtCustomizer, saml } from '@logto/schemas';
|
||||
import { object, string } from 'zod';
|
||||
|
||||
import koaGuard from '#src/middleware/koa-guard.js';
|
||||
|
@ -35,6 +35,7 @@ export default function logRoutes<T extends ManagementApiRouter>(
|
|||
token.Type.RevokeToken,
|
||||
interaction.prefix,
|
||||
jwtCustomizer.prefix,
|
||||
saml.prefix,
|
||||
LogKeyUnknown,
|
||||
];
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ export default function samlApplicationAnonymousRoutes<T extends AnonymousRouter
|
|||
|
||||
log.append({
|
||||
query,
|
||||
samlApplicationId: id,
|
||||
applicationId: id,
|
||||
});
|
||||
|
||||
// Handle error in query parameters
|
||||
|
@ -208,7 +208,7 @@ export default function samlApplicationAnonymousRoutes<T extends AnonymousRouter
|
|||
const log = ctx.createLog('SamlApplication.AuthnRequest');
|
||||
log.append({
|
||||
query: ctx.guard.query,
|
||||
samlApplicationId: id,
|
||||
applicationId: id,
|
||||
});
|
||||
|
||||
const details = await getSamlApplicationDetailsById(id);
|
||||
|
@ -317,7 +317,7 @@ export default function samlApplicationAnonymousRoutes<T extends AnonymousRouter
|
|||
const log = ctx.createLog('SamlApplication.AuthnRequest');
|
||||
log.append({
|
||||
body: ctx.guard.body,
|
||||
samlApplicationId: id,
|
||||
applicationId: id,
|
||||
});
|
||||
|
||||
const details = await getSamlApplicationDetailsById(id);
|
||||
|
|
Loading…
Add table
Reference in a new issue