Ana içeriğe geç

Denetim olayları

not

Başlıklar ve tablolar Türkçe; açıklamalar koddan üretildiği için İngilizce.

Audit'e yazılan her aksiyon bir olaydır. Veritabanında tutulur (Yönetim → Denetim Logları, CSV dışa aktarma) ve LOG_INCLUDE_AUDIT=true ile (varsayılan) stdout'a tek satır olarak yazılır; böylece aynı alanlar hem arayüzde hem log platformunuzda filtrelenebilir. ECS adları LOG_FORMAT=ecs ile geçerlidir; json düz adları kullanır.

Okumalar da audit'e yazılır (deployment.list, pod.get, pod.logs), reddedilenler dahil. Arayüzün kendi kendine yenilediği listeler yazılmaz (X-OpenConsole-Refresh: auto gönderirler); HTTP istek logunda yine her istek vardır. API anahtarıyla bu header yok sayılır: her okuma audit'e yazılır.

Alanlar​

AlanECSAnlamı
eventevent.actionThe action, <resource type>.<verb>: deployment.restart, secret.reveal, user.login.
verbopenconsole.verbWhat was done (see Verbs below).
outcomeopenconsole.outcomeHow it ended (see Outcomes below). In ECS also event.outcome: success or failure.
reasonevent.reasonWhy it was denied or failed: forbidden, feature_disabled, admin_only, api_access_policy, k8s_forbidden, not_found, conflict, invalid, bad_password, …
useruser.nameWho: the signed-in user (for a failed sign-in, the name typed).
auth_sourceopenconsole.auth_sourceWhere the account signs in: local, ldap or azure.
clusteropenconsole.clusterThe cluster the action targeted. Empty for actions that don't run on a cluster (sign-ins, users, roles, settings, saved views). A permission grant records the grant's cluster (empty = all clusters).
cluster_idopenconsole.cluster_idThe id of that cluster.
namespaceopenconsole.namespaceThe target's namespace.
resource_typeopenconsole.resource_typeSingular resource type: deployment, pod, user, api_key, …
resource_nameopenconsole.resource_nameThe target's name; * for a list.
request_idhttp.request.idSame as the http.request log line of the request, and the X-Request-Id response header.
remote_ipsource.ipClient address: the first X-Forwarded-For entry, else X-Real-Ip, else the connection's address.
user_agentuser_agent.originalThe client's User-Agent.
api_key_idopenconsole.api_key.idThe API key the action was taken with; empty for a web session.
api_key_nameopenconsole.api_key.nameThat key's name.

Aksiyonlar​

Aksiyon <resource type>.<verb> biçimindedir. Handler'ların kodundan okunur; her aksiyon, bitebileceği bütün sonuçlarla listelenir. <resource>, kontrolün yapıldığı herhangi bir Kubernetes kaynak türünün yerine geçer (pod, deployment, …).

AksiyonSonuçlar
<resource>.applysuccess, denied, failed, rate_limited
<resource>.getdenied
<resource>.listdenied
api_key.createsuccess, denied, failed
api_key.deletesuccess, denied, failed
api_key.exportsuccess, denied, failed
api_key.getsuccess, denied
api_key.listsuccess, denied, failed
api_key.regeneratesuccess, denied, failed
api_key.revokesuccess, denied, failed
api_key.updatesuccess, denied, failed
api_key.usedenied, rate_limited
backup.createsuccess, failed
backup.downloadsuccess, denied, failed
cluster.activatesuccess
cluster.createsuccess
cluster.deactivatesuccess
cluster.deletesuccess
cluster.selectsuccess, denied, failed
cluster.updatesuccess
cluster.usedenied
cluster.view_overviewsuccess, denied, failed
configmap.getsuccess, denied
configmap.listsuccess, denied
cronjob.getsuccess, denied
cronjob.listsuccess, denied
daemonset.getsuccess, denied
daemonset.listsuccess, denied
deployment.getsuccess, denied
deployment.listsuccess, denied
deployment.logssuccess, denied, rate_limited
deployment.restartsuccess, denied, failed, rate_limited
deployment.scalesuccess, denied, failed, rate_limited
group.createsuccess, denied, failed
group.deletesuccess, denied, failed
group.exportsuccess
group.updatesuccess, denied, failed
hpa.getsuccess, denied
hpa.listsuccess, denied
ingress.getsuccess, denied
ingress.listsuccess, denied
job.getsuccess, denied
job.listsuccess, denied
job.logssuccess, denied, rate_limited
namespace.getsuccess
namespace.listsuccess
node.getsuccess, denied, failed
node.listsuccess, denied, failed
permission.createsuccess, denied, failed
permission.deletesuccess, denied, failed
pod.execsuccess, denied, failed, rate_limited
pod.getsuccess, denied
pod.listsuccess, denied
pod.logssuccess, denied, failed, rate_limited
recording.createsuccess, failed
recording.deletesuccess, denied, failed
recording.downloadsuccess, denied, failed
recording.evictsuccess
recording.purgesuccess
recording.viewsuccess, denied, failed
role.createsuccess, denied, failed
role.deletesuccess, denied, failed
role.updatesuccess, denied, failed
saved_view.createsuccess, denied
saved_view.deletesuccess, denied
saved_view.sharesuccess, denied
secret.getsuccess, denied
secret.listsuccess, denied
secret.revealsuccess, denied, failed
secret.view_yamlsuccess, denied, failed
service.getsuccess, denied
service.listsuccess, denied
session.revokesuccess
settings.deletesuccess, denied, failed
settings.updatesuccess, denied, failed
statefulset.getsuccess, denied
statefulset.listsuccess, denied
statefulset.scalesuccess, denied, failed, rate_limited
user.change_passwordsuccess, denied
user.createsuccess, denied, failed
user.deletesuccess, denied, failed
user.exportsuccess
user.getsuccess, failed
user.importsuccess
user.loginsuccess, failed, locked
user.reset_passwordsuccess, denied, failed
user.updatesuccess, denied, failed

İşlem türleri​

İşlem türüAnlamı
listlisted (* as the name)
getread one object
logsread or followed logs
execopened a shell (phase start / end) or ran one command (mode command)
restartrolling restart
scalechanged the replica count
applyapplied YAML (dry_run true for the dry run)
view_yamlopened the YAML (for a Secret: the editor, which shows the values)
revealrevealed one Secret value
viewplayed a session recording
downloaddownloaded a session recording
createcreated
updatechanged
deletedeleted
shareshared or unshared a saved view
selectpicked a cluster to work on
activatemade a cluster the default
deactivatedeactivated
revokerevoked a session or an API key
exportexported a CSV
importimported users from LDAP
loginsigned in
change_passwordchanged one's own password
reset_passwordan admin set a new password for a local user
evictdeleted a recording to stay within the disk quota
purgedeleted recordings past their retention
view_overviewopened the admin overview
regeneratereplaced an API key's secret
usepresented an API key, or worked on a cluster named per request (X-OpenConsole-Cluster; recorded only when it was refused or rate limited)

Sonuçlar​

SonuçAnlamı
successdone
deniedrefused by OpenConsole: permission, feature flag, API key policy, admin only
failedallowed, but it didn't work: Kubernetes refused it, not found, conflict, bad password
rate_limitedtoo many at once: open shells per user, API key requests per second
lockedsign-in refused while the account is locked after failed attempts

Ayrıntılar​

Türü belli, sabit bir anahtar kümesi; her biri log satırında ayrı bir alandır. Hiçbir zaman secret değeri, YAML gövdesi, parola ya da token taşımaz. Tür, deploy/elk içindeki Elasticsearch türüdür.

AnahtarTürECSAnlamı
account_sourcekeywordopenconsole.account_sourceuser.*: the target account's source
admin_scopebooleanopenconsole.admin_scopeapi_key.*: the key holds the Admin API scope
allbooleanopenconsole.allsession.revoke, api_key.revoke: every one of the user's
api_accesskeywordopenconsole.api_accessrole.update, user.update: API access mode (off, safe_read, full, roles)
auto_provisionedbooleanopenconsole.auto_provisioneduser.create: created on first LDAP sign-in
by_adminbooleanopenconsole.by_adminapi_key.revoke: an admin revoked another user's key
bytes_inlongopenconsole.bytes_inpod.exec shell end: bytes typed
bytes_outlongopenconsole.bytes_outpod.exec: bytes of output
changedkeywordopenconsole.changed*.update: names of the fields changed, never their values
commandkeywordopenconsole.commandpod.exec shell: the shell started (/bin/sh, …)
commenttextopenconsole.commentapi_key.revoke: the admin's reason
containerkeywordopenconsole.containerpod.exec, pod.logs, recording.create: the container
countlongopenconsole.count*.export, *.list of API keys, user.import, recording.purge, api_key.revoke all: how many
dry_runbooleanopenconsole.dry_run*.apply: true for the server-side dry run
duration_mslongopenconsole.duration_mspod.exec, recording.create: how long it ran
errortexterror.messagefailed events: the error message (in ECS error.message)
exit_codelongopenconsole.exit_codepod.exec: the exit code
expires_atdateopenconsole.expires_atapi_key.*: expiry
grantkeywordopenconsole.grantpermission.*: resource:action
groupslongopenconsole.groupsuser.*, user.import: number of groups
idlongopenconsole.idapi_key.*, permission.*, recording.delete: the id
is_activebooleanopenconsole.is_activeuser.update: active after the change
is_adminbooleanopenconsole.is_adminuser.*: admin after the change
keykeywordopenconsole.keysecret.reveal: the key name (never the value)
linked_bykeywordopenconsole.linked_byuser.login with Azure AD: the claim a pre-created account was matched by (UPN or e-mail)
login_methodkeywordopenconsole.login_methoduser.login: local, ldap or azure
max_sessionslongopenconsole.max_sessionspod.exec rate limited: the per-user limit
modekeywordopenconsole.modepod.exec: command for one command over the API
must_changebooleanopenconsole.must_changeuser.reset_password: the user must choose a new password
ownerkeywordopenconsole.ownerrecording.evict, saved_view.*, api_key.revoke by an admin: whose it is
phasekeywordopenconsole.phasepod.exec shell: start or end
podkeywordopenconsole.podrecording.create, recording.evict: the pod of the shell
podslongopenconsole.podsdeployment.logs, job.logs: how many pods the stream follows
previousbooleanopenconsole.previouspod.logs: logs of the previous (crashed) container
programkeywordopenconsole.programpod.exec command: the program only (first element), never the arguments
recording_idkeywordopenconsole.recording_idpod.exec command: the session recording's id
replicas_fromlongopenconsole.replicas_from*.scale: replicas before
replicas_tolongopenconsole.replicas_to*.scale: replicas requested
restarted_atdateopenconsole.restarted_atdeployment.restart: the time written to the pod template
retention_dayslongopenconsole.retention_daysrecording.purge: the retention applied
rolekeywordopenconsole.rolepermission.*: the role
session_idkeywordopenconsole.session_idsession.revoke: the sign-in session revoked
sharedbooleanopenconsole.sharedsaved_view.*: shared with everyone
signed_in_askeywordopenconsole.signed_in_asuser.login with Azure AD: the name the user signed in with
size_byteslongopenconsole.size_bytesrecording.*: file size (recording.purge: bytes freed)
started_atdateopenconsole.started_atrecording.evict: when the recorded session started
summarytextopenconsole.summarysettings.update, api_key.*, user.import: a short summary of what was set
truncate_reasonkeywordopenconsole.truncate_reasonpod.exec end: why the recording stopped early (size cap, disk quota)
yaml_fromkeywordopenconsole.yaml_from*.apply: sha256 prefix of the object before (never the YAML)
yaml_tokeywordopenconsole.yaml_to*.apply: sha256 prefix of the YAML applied