We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5e7f8fa + b0a2e89 commit fe64129Copy full SHA for fe64129
enforcer/pkg/control/common/reqcontext.go
@@ -108,6 +108,10 @@ func (rc *ReqContext) IsCreator() bool {
108
return rc.UserName != "" && rc.UserName == rc.OrgMetadata.Annotations.CreatedBy()
109
}
110
111
+func (rc *ReqContext) IsSecret() bool {
112
+ return rc.Kind == "Secret" && rc.GroupVersion() == "v1"
113
+}
114
+
115
type ParsedRequest struct {
116
UID string
117
JsonStr string
enforcer/pkg/control/enforcer/checkcontext.go
@@ -558,7 +558,7 @@ func (self *CheckContext) convertToLogBytes() []byte {
558
559
560
561
- if self.config.Log.IncludeRequest {
+ if self.config.Log.IncludeRequest && !reqc.IsSecret() {
562
logRecord["request.dump"] = reqc.RequestJsonStr
563
564
0 commit comments