Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-10460. Refine audit logging for bucket property updation operations #6329

Merged
merged 6 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ private OzoneConsts() {
public static final String USED_NAMESPACE = "usedNamespace";
public static final String QUOTA_IN_BYTES = "quotaInBytes";
public static final String QUOTA_IN_NAMESPACE = "quotaInNamespace";
public static final String BUCKET_ENCRYPTION_KEY_NAME = "bucketEncryptionKey";
tanvipenumudy marked this conversation as resolved.
Show resolved Hide resolved
public static final String OBJECT_ID = "objectID";
public static final String UPDATE_ID = "updateID";
public static final String CLIENT_ID = "clientID";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,27 @@ public Map<String, String> toAuditMap() {
if (this.ownerName != null) {
auditMap.put(OzoneConsts.OWNER, this.ownerName);
}
if (this.quotaInBytesSet && quotaInBytes > 0 ||
(this.quotaInBytes != OzoneConsts.QUOTA_RESET)) {
auditMap.put(OzoneConsts.QUOTA_IN_BYTES,
String.valueOf(this.quotaInBytes));
}
if (this.quotaInNamespaceSet && quotaInNamespace > 0 ||
(this.quotaInNamespace != OzoneConsts.QUOTA_RESET)) {
auditMap.put(OzoneConsts.QUOTA_IN_NAMESPACE,
String.valueOf(this.quotaInNamespace));
}
if (this.bekInfo != null) {
auditMap.put(OzoneConsts.BUCKET_ENCRYPTION_KEY_NAME,
this.bekInfo.getKeyName());
}
if (this.defaultReplicationConfig != null) {
auditMap.put(OzoneConsts.REPLICATION_TYPE, String.valueOf(
this.defaultReplicationConfig.getType()));
auditMap.put(OzoneConsts.REPLICATION_CONFIG,
this.defaultReplicationConfig.getReplicationConfig()
.getReplication());
}
return auditMap;
}

Expand Down