25 lines
641 B
TypeScript
25 lines
641 B
TypeScript
/** Access denials as the dashboard reads them from /api/access/denials:
|
|
* one recorded refusal, coalesced per minute into a count. */
|
|
export interface Denial {
|
|
principal: string;
|
|
org: string;
|
|
action: string;
|
|
kind: string;
|
|
resource: string;
|
|
level: string;
|
|
policies: string[];
|
|
at: string;
|
|
count: number;
|
|
}
|
|
|
|
export interface DenialsResponse {
|
|
denials: Denial[];
|
|
/** Whether older refusals match beyond this page. */
|
|
more: boolean;
|
|
}
|
|
|
|
/** The resource column: the kind and id together, or just the kind. */
|
|
export function denialResource(d: Denial): string {
|
|
return d.resource ? `${d.kind}/${d.resource}` : d.kind;
|
|
}
|