-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fiat): Remove services.fiat.autoconfig property in favor of @Enab…
…leFiatAutoConfig annotation (#154)
- Loading branch information
Travis Tomsu
authored
Mar 10, 2017
1 parent
90f9260
commit c563782
Showing
3 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
fiat-api/src/main/java/com/netflix/spinnaker/fiat/shared/EnableFiatAutoConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2017 Google, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.fiat.shared; | ||
|
||
import org.springframework.context.annotation.Import; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* For a component that uses this annotation, the Fiat Spring Security configuration will be | ||
* applied. This does not mean that Fiat is required to be enabled, just that the whole service has | ||
* Spring Security layers and filters for requests/responses. | ||
* | ||
* With this annotation and Fiat disabled, the biggest difference is the ability to access the | ||
* Spring Management Server endpoints (/env, /beans, /autoconfig, etc). Most of these endpoints are | ||
* considered "sensitive", and therefore are disabled from an unauthenticated user requesting them | ||
* over HTTP. In order to still access them, you must use HTTP Basic authentication. See | ||
* http://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html | ||
* for more details. | ||
* | ||
* With this annotation and Fiat enabled, @Controller invocations annotated with Fiat authorization | ||
* checks will be performed and enforced. The above Management Server endpoint information still | ||
* applies. | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.TYPE) | ||
@Import(FiatAuthenticationConfig.class) | ||
public @interface EnableFiatAutoConfig { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters