Skip to content

Commit

Permalink
feat: added Webhooks and RevokeOnReenroll for DMS(#50)
Browse files Browse the repository at this point in the history
Signed-off-by: haritz <[email protected]>
  • Loading branch information
haritzsaiz authored Jan 4, 2025
1 parent 6b0d9c8 commit 936b285
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 24 deletions.
2 changes: 1 addition & 1 deletion env-docker-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ window._env_ = {
LAMASSU_DMS_MANAGER_API: `https://${DOMAIN}/api/dmsmanager`,
LAMASSU_DEVMANAGER_API:`https://${DOMAIN}/api/devmanager`,
LAMASSU_ALERTS_API:`https://${DOMAIN}/api/alerts`,
LAMASSU_VA:`https://${DOMAIN}/api/va`,
LAMASSU_VA_API:`https://${DOMAIN}/api/va`,
LAMASSU_VDMS:``,
LAMASSU_VDEVICE:``,
CLOUD_CONNECTORS: $CLOUD_CONNECTORS
Expand Down
24 changes: 23 additions & 1 deletion src/ducks/features/dmss/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export enum EnrollmentRegistrationMode {
export enum ESTAuthMode {
NoAuth = "NO_AUTH",
ClientCertificate = "CLIENT_CERTIFICATE",
ExternalWebhook = "EXTERNAL_WEBHOOK",
}

export type AuthOptionsClientCertificate = {
Expand All @@ -43,6 +44,26 @@ export type AuthOptionsClientCertificate = {
export type EST7030Settings = {
auth_mode: ESTAuthMode,
client_certificate_settings: AuthOptionsClientCertificate,
external_webhook?: Webhook,
}

export type Webhook = {
url: string,
name: string,
validate_server_cert: boolean,
config: {
log_level: string,
auth_mode: string,
oidc?: {
client_id: string,
client_secret: string,
well_known: string,
},
apikey?: {
header: string,
key: string,
}
}
}

export type EnrollmentSettings = {
Expand All @@ -63,13 +84,14 @@ export type ReEnrollmentSettings = {
additional_validation_cas: string[],
reenrollment_delta: string,
enable_expired_renewal: boolean,
revoke_on_reenrollment: boolean,
preventive_delta: string,
critical_delta: string,
}

export type ServerKeygenSettings = {
enabled: boolean,
key:{
key: {
type: "RSA" | "ECDSA",
bits: number
}
Expand Down
Loading

0 comments on commit 936b285

Please sign in to comment.