Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
stonezdj committed Mar 28, 2022
1 parent da23775 commit 29ed8d8
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions proposals/new/audit_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The audit_log table because of it is large size, it requires the DBA to create a

## Proposal

Purge the audit log with a specified schedule, for example, every day at 00:00:00, or every week at 00:00:00. it could specify the operations need to delete and the retention hours need to keep. user could schedule the job to delete the audit_log records manually or periodically. if the audit log retention hours is set to 0, it means the audit log will be kept.
Purge the audit log with a specified schedule, for example, every day at 00:00:00, or every week at 00:00:00. it could specify the operations need to delete and the retention hours need to keep. user could schedule the job to delete the audit_log records manually or periodically. if the audit log retention hours is set to 0, it means the audit log will be kept.

The purge audit log job could be scheduled by cron job or manually. after executed the job, the purge job history could be retrived by the API.

Expand Down Expand Up @@ -137,11 +137,6 @@ func (h *Handler) Handle(ctx context.Context, value interface{}) error {

#### Purge the audit log table

In the harbor core main function, start a go function to purge the audit log table periodically.

```
auditLogCtr.StartAuditLogPurger()
```
The Purge audit log should be implemented as job service type

```
Expand All @@ -162,12 +157,10 @@ func (j *AuditJob) Run(ctx job.Context, params job.Parameters) error {
}
```

The audit log purger could be implemented with jobservice, but it is might be complex and not easy to maintain.

### UI

There is an audit log configurable page.
It includes configure items:
There is an audit log config in the main nativgation tree.
It includes three tabs:

### Purge Job

Expand Down Expand Up @@ -196,7 +189,7 @@ If a user enable the option no audit log in database, then all audit log related

## Open issues (if applicable)

The curren audit log implementation is syslog, it is not work as previous core.log or registry.log, which are log to stdout of the container. the audit log might need to configure separately in kubernetes.
The current audit log implementation is syslog, it is not work as previous core.log or registry.log, which are log to stdout of the container. the audit log might need to configure separately in kubernetes.

The schema of the audit_log will be changed in furture, users might have to change the query to get a specific information in LogViewer/LogInsight.

Expand Down

0 comments on commit 29ed8d8

Please sign in to comment.