Skip to content

Commit

Permalink
Merge pull request #22 from OpenCHAMI/trcotton/remove-scope-from-get
Browse files Browse the repository at this point in the history
removed the scope check for the get components and redfishendpoints
  • Loading branch information
travisbcotton authored May 17, 2024
2 parents 170d7a3 + c1b41dc commit d551820
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions cmd/smd/smd-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,15 +427,6 @@ func (s *SmD) doComponentsGet(w http.ResponseWriter, r *http.Request) {
comps := new(base.ComponentArray)
var err error

// Check claims before doing anything if using authentication
if s.IsUsingAuthentication() {
if _, err := s.VerifyScope([]string{"smd.read"}, r); err != nil {
sendJsonError(w, http.StatusUnauthorized,
fmt.Sprintf("failed to verify scope: %v", err))
return
}
}

// Parse arguments
if err := r.ParseForm(); err != nil {
s.lg.Printf("doComponentsGet(): ParseForm: %s", err)
Expand Down Expand Up @@ -2063,15 +2054,6 @@ func (s *SmD) doRedfishEndpointsGet(w http.ResponseWriter, r *http.Request) {
eps := new(sm.RedfishEndpointArray)
var err error

// Check claims before doing anything if using authentication
if s.IsUsingAuthentication() {
if _, err := s.VerifyScope([]string{"smd.read"}, r); err != nil {
sendJsonError(w, http.StatusUnauthorized,
fmt.Sprintf("failed to verify scope: %v", err))
return
}
}

// Parse arguments
if err := r.ParseForm(); err != nil {
s.lg.Printf("doRedfishEndpointsGet(): ParseForm: %s", err)
Expand Down

0 comments on commit d551820

Please sign in to comment.