mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
update the log level of robot v1 context (#15037)
The robotv1 context uses the robot$ as a hardcoded prefix to identify robot account, it will raise error for a valid robotv2 account with this prefix. Update the log level to avoid the redundant logs for the default installation. Signed-off-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
parent
ae06ac2fae
commit
2a1c9ec96a
@ -46,7 +46,7 @@ func (r *robot) Generate(req *http.Request) security.Context {
|
|||||||
}
|
}
|
||||||
rtk, err := pkg_token.Parse(defaultOpt, robotTk, rClaims)
|
rtk, err := pkg_token.Parse(defaultOpt, robotTk, rClaims)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("failed to decrypt robot token: %v", err)
|
log.Debugf("failed to decrypt robot token of v1 robot: %s, as: %v", robotName, err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// Do authn for robot account, as Harbor only stores the token ID, just validate the ID and disable.
|
// Do authn for robot account, as Harbor only stores the token ID, just validate the ID and disable.
|
||||||
|
Loading…
Reference in New Issue
Block a user