Skip to content

Commit

Permalink
rename sentinel check token generator to reflect type of token generated
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphall committed Dec 5, 2024
1 parent f89afeb commit 1a47800
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server_utils/origin.go
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ from S3 service URL. In this configuration, objects can be accessed at /federati

// Generate a minimally scoped auth token that allows the origin
// to query itself for its sentinel file
func generateSentinelCheckScitoken(resourceScope string) (string, error) {
func generateSentinelReadToken(resourceScope string) (string, error) {
issuerUrl := param.Server_ExternalWebUrl.GetString()
if issuerUrl == "" { // if both are empty, then error
return "", errors.New("failed to create a sentinel check auth token because required configuration 'Server.ExternalWebUrl' is empty")
Expand Down Expand Up @@ -789,7 +789,7 @@ func CheckOriginSentinelLocations(exports []OriginExport) (ok bool, err error) {
}

fullPath := filepath.Join(export.FederationPrefix, sentinelPath)
tkn, err := generateSentinelCheckScitoken(sentinelPath)
tkn, err := generateSentinelReadToken(sentinelPath)
if err != nil {
return false, errors.Wrap(err, "failed to generate self-auth token for sentinel object check")
}
Expand Down

0 comments on commit 1a47800

Please sign in to comment.