Skip to content

Commit 2043c8b

Browse files
authored
Merge pull request #99 from rsharifnasab/main
Remove sensetive data from tracing
2 parents 5db2880 + 95cdbe9 commit 2043c8b

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

internal/api/acl.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ func (a API) ACLv1(c *fiber.Ctx) error {
5555
span.SetAttributes(
5656
attribute.String("access", request.Access.String()),
5757
attribute.String("topic", request.Topic),
58-
attribute.String("token", request.Token),
59-
attribute.String("username", request.Username),
60-
attribute.String("password", request.Password),
6158
attribute.String("authenticator", auth.GetCompany()),
6259
)
6360

@@ -152,9 +149,6 @@ func (a API) ACLv2(c *fiber.Ctx) error {
152149
span.SetAttributes(
153150
attribute.String("access", request.Action),
154151
attribute.String("topic", request.Topic),
155-
attribute.String("token", request.Token),
156-
attribute.String("username", request.Username),
157-
attribute.String("password", request.Password),
158152
attribute.String("authenticator", auth.GetCompany()),
159153
)
160154

internal/api/auth.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,7 @@ func (a API) Authv1(c *fiber.Ctx) error {
4747

4848
auth := a.Authenticator(vendor)
4949

50-
span.SetAttributes(
51-
attribute.String("token", request.Token),
52-
attribute.String("username", request.Username),
53-
attribute.String("password", request.Password),
54-
attribute.String("authenticator", auth.GetCompany()),
55-
)
50+
span.SetAttributes(attribute.String("authenticator", auth.GetCompany()))
5651

5752
err := auth.Auth(token)
5853
if err != nil {
@@ -114,12 +109,7 @@ func (a API) Authv2(c *fiber.Ctx) error {
114109

115110
auth := a.Authenticator(vendor)
116111

117-
span.SetAttributes(
118-
attribute.String("token", request.Token),
119-
attribute.String("username", request.Username),
120-
attribute.String("password", request.Password),
121-
attribute.String("authenticator", auth.GetCompany()),
122-
)
112+
span.SetAttributes(attribute.String("authenticator", auth.GetCompany()))
123113

124114
err := auth.Auth(token)
125115
if err != nil {

0 commit comments

Comments
 (0)