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

[DSIP-26][Audit log] Audit log improvement design #15554

Merged
merged 87 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
771e934
init
qingwli Jan 15, 2024
844585a
update
qingwli Feb 1, 2024
27277f8
Merge branch 'dev' into augit-log
qingwli Feb 1, 2024
c95faa4
support multi codes
qingwli Feb 1, 2024
e79ff87
update
qingwli Feb 2, 2024
a68357c
update
qingwli Feb 2, 2024
6fd8671
update
qingwli Feb 2, 2024
1eb5d03
update audit log ui
yeahhhz Feb 2, 2024
1de52c1
fix
yeahhhz Feb 2, 2024
f46860a
Merge pull request #3 from yeahhhz/audit-log-2
qingwli Feb 2, 2024
bbb785b
update object name
yeahhhz Feb 2, 2024
a7017f1
Merge pull request #4 from yeahhhz/audit-log-3
qingwli Feb 2, 2024
91432e5
update
qingwli Feb 2, 2024
51ee4d3
Merge remote-tracking branch 'upstream/dev' into augit-log
qingwli Feb 2, 2024
20b0085
update
qingwli Feb 2, 2024
adf4651
update
qingwli Feb 2, 2024
5aff032
update
qingwli Feb 2, 2024
29ed211
update
qingwli Feb 2, 2024
7ff0a50
update
qingwli Feb 2, 2024
4a3558a
update
qingwli Feb 2, 2024
6aeec45
update
qingwli Feb 2, 2024
133a6cc
update
qingwli Feb 5, 2024
bc34a49
Merge branch 'dev' into audit-log
qingwli Feb 5, 2024
9a3ef75
update
qingwli Feb 5, 2024
1214761
Merge branch 'audit-log' of https://github.com/qingwli/dolphinschedul…
qingwli Feb 5, 2024
b6d08ed
update
qingwli Feb 5, 2024
9c8eab8
update
qingwli Feb 5, 2024
c223d28
fix code smell
qingwli Feb 6, 2024
9fdcafe
Merge branch 'dev' into audit-log
qingwli Feb 6, 2024
625e7bc
update
qingwli Feb 6, 2024
3f933c6
Merge branch 'dev' into audit-log
qingwli Feb 6, 2024
5e39e4e
update
qingwli Feb 6, 2024
1fd6e65
Merge branch 'audit-log' of https://github.com/qingwli/dolphinschedul…
qingwli Feb 6, 2024
c885883
Merge remote-tracking branch 'origin/dev' into audit-log
qingwli Feb 6, 2024
b75f927
update
qingwli Feb 6, 2024
81be755
update
qingwli Feb 6, 2024
0d9dd8d
Merge branch 'dev' into audit-log
rickchengx Feb 6, 2024
53a2079
Merge branch 'dev' into audit-log
qingwli Feb 7, 2024
a7ab53f
Merge branch 'dev' into audit-log
qingwli Feb 20, 2024
83bda8e
add 3.3.0 upgrade sql
qingwli Feb 20, 2024
ce0e1ba
Merge branch 'dev' into audit-log
qingwli Feb 21, 2024
bae273e
Merge branch 'dev' into audit-log
qingwli Feb 26, 2024
10f380d
Merge branch 'dev' into audit-log
qingwli Feb 27, 2024
82222a5
Merge branch 'dev' into audit-log
qingwli Feb 29, 2024
94f9fd3
update
qingwli Mar 8, 2024
d499513
Merge branch 'audit-log' of https://github.com/qingwli/dolphinschedul…
qingwli Mar 8, 2024
b56e74c
Merge branch 'dev' into audit-log
qingwli Mar 8, 2024
7a4f833
update
qingwli Mar 8, 2024
44874bd
Update dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler…
qingwli Mar 8, 2024
8f1c06e
update
qingwli Mar 8, 2024
4eebc90
update
qingwli Mar 8, 2024
beb529f
update
qingwli Mar 8, 2024
1411b3e
update audit ui
yeahhhz Mar 11, 2024
ccd0699
Merge pull request #5 from yeahhhz/audit-ui-update
qingwli Mar 11, 2024
0f17a77
update
qingwli Mar 11, 2024
066c0ec
Merge branch 'dev' into audit-log
qingwli Mar 11, 2024
963825b
fix
qingwli Mar 11, 2024
3ee0fcd
Merge branch 'audit-log' of https://github.com/qingwli/dolphinschedul…
qingwli Mar 11, 2024
23680a9
Merge branch 'dev' into audit-log
qingwli Mar 12, 2024
0eee722
Merge branch 'dev' into audit-log
qingwli Mar 21, 2024
7e6650f
Merge branch 'dev' into audit-log
qingwli Mar 22, 2024
ec07e92
fix
qingwli Mar 22, 2024
90c36a3
update
qingwli Mar 22, 2024
72b2fae
Merge branch 'dev' into audit-log
qingwli Mar 28, 2024
c324855
update
qingwli Mar 29, 2024
ad89230
Merge branch 'dev' into audit-log
qingwli Mar 29, 2024
ff24270
fix
qingwli Mar 29, 2024
f79d6fe
Merge branch 'audit-log' of https://github.com/qingwli/dolphinschedul…
qingwli Mar 29, 2024
3430054
test
qingwli Mar 29, 2024
ddad807
update
qingwli Mar 30, 2024
836c978
Merge branch 'dev' into audit-log
qingwli Mar 30, 2024
d8c1241
update
qingwli Mar 30, 2024
36332ea
Merge branch 'audit-log' of https://github.com/qingwli/dolphinschedul…
qingwli Mar 30, 2024
a584530
Merge branch 'dev' into audit-log
qingwli Apr 2, 2024
3b7f63c
update
qingwli Apr 2, 2024
84df67e
update
qingwli Apr 2, 2024
549b985
update
qingwli Apr 2, 2024
847f193
change object -> model
qingwli Apr 3, 2024
ed57b8b
Merge branch 'dev' into audit-log
qingwli Apr 3, 2024
91ae786
Merge branch 'dev' into audit-log
qingwli Apr 5, 2024
61f5f50
Merge branch 'dev' into audit-log
qingwli Apr 7, 2024
c7e8ecd
Merge branch 'dev' into audit-log
qingwli Apr 8, 2024
a7f137a
Merge branch 'dev' into audit-log
qingwli Apr 10, 2024
ce108d8
Merge branch 'dev' into audit-log
qingwli Apr 12, 2024
cc5de74
Merge branch 'dev' into audit-log
qingwli Apr 15, 2024
5e881fc
update
qingwli Apr 15, 2024
8e0613b
Merge branch 'dev' into audit-log
ruanwenjun Apr 15, 2024
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

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.dolphinscheduler.api.audit;

import org.apache.dolphinscheduler.common.enums.AuditObjectType;
import org.apache.dolphinscheduler.common.enums.AuditOperationType;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Custom annotation for logging and auditing operator actions in the system.
* This annotation can be applied to methods to indicate the type of operation, object type,
* and specific parameters to be recorded in the logs.
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface OperatorLog {

/**
* Specifies the type of object involved in the audit operation (default: PROJECT).
* Possible values include PROJECT, USER, etc.
*/
AuditObjectType objectType() default AuditObjectType.PROJECT;
qingwli marked this conversation as resolved.
Show resolved Hide resolved

/**
* Specifies the type of the audit operation (default: CREATE).
* Possible values include CREATE, UPDATE, DELETE, etc.
*/
AuditOperationType operationType() default AuditOperationType.CREATE;

/**
* The names of the fields in the API request to be recorded.
* Represents an array of key-value pairs, e.g., ["id", "status"].
*/
String[] requestParamName() default {};

/**
* The names of the fields in the returned object to be recorded.
* Represents an array of field names, e.g., ["id", "code"].
* Specify the field names to record from the returned object.
*/
String[] returnObjectFieldName() default {};
qingwli marked this conversation as resolved.
Show resolved Hide resolved
}
Loading
Loading