Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1062: Dp-authorisation - Remove Enabled config variable in authorisation package #58

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion authorisation/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ type Config struct {
// NewDefaultConfig populates the config struct with default values suitable for local development.
func NewDefaultConfig() *Config {
return &Config{
Enabled: true,
JWTVerificationPublicKeys: map[string]string{"NeKb65194Jo=": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0TpTemKodQNChMNj1f/NF19nMAbjKbwRENSKujO5iwXLIt0hCjh5dz4egKQo7KEr2ex3qdy50LWKD871gRfAgDoRD5/1kUUVqII5K09IDCVY/EohukrI+Uep/Z5ymPNPXXD1yJvBx/YmmuMGUAT5UKHKBCP+FcoAxYAKcaKhtL0iyVjhtD0Y4V8gcQnQq3bOYhF4FEHoHBNh23AKcJM1VvNVtSHViMuTOzsFLHAgy2lLsRLnxtXovEovAiTay+Sn1FuDOq2gswl2Uujh1GO8kfkXE1gNRn/l7RUYIRrql8kROHMSYvPBAIqYhGSWOG3JX1oFlI1erYaeIPI4l4Qj/P+YSnrRx0di3vy6ZDAnhs8kdZP81F+3rFrNUNIOVFBRKscMnvOH4HO4f9PpXynde5xTlVvqdgXVlWkxGgQk0d323ka8fPY1xsmxV99idmmgmfglPOeLxuOkFxfXJSpbP/kn9AEyKBcF2BImfc12uvdSn46zZ1f/8nvzQ9naruwEtho4t6cIb7A+5KxVAILCQHvm3xIxfxMy5RFIeR7T3KhW2URDtiGMKuEE44EQwtxXxnMUdmvBUyHg2iQ54ELD4uVVVkGZkT5cTIf8iwfWI808B+CE5T8I3YrK7DiaVkJqTWX9LqWqetwHQxY48iTN+nPguHQ6dkZwmxuWBEuQ9eECAwEAAQ=="},
PermissionsAPIURL: "http://localhost:25400",
ZebedeeURL: "http://localhost:8082",
Expand Down
4 changes: 0 additions & 4 deletions authorisation/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ type GetAttributesFromRequest func(req *http.Request) (attributes map[string]str
// NewFeatureFlaggedMiddleware returns a different Middleware implementation depending on the configured feature flag value
// Use this constructor when first adding authorisation as middleware so that it can be toggled off if required.
func NewFeatureFlaggedMiddleware(ctx context.Context, config *Config, jwtRSAPublicKeys map[string]string) (Middleware, error) {
if config.Enabled {
return NewMiddlewareFromConfig(ctx, config, jwtRSAPublicKeys)
}

return NewNoopMiddleware(), nil
}

Expand Down