mirror of https://github.com/apache/nifi.git
NIFI-1783: - Addressing mistake in exmample XML. - Ensuring the configured Authorizer is loaded correctly.
This closes #363. Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
parent
13488fd9b3
commit
8c09a5c8d2
|
@ -31,6 +31,10 @@
|
|||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-jetty</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-file-authorizer</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mark these nifi artifacts as provided since it is included in the lib -->
|
||||
<dependency>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<goal>xjc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<packageName>org.apache.nifi.authorization.generated</packageName>
|
||||
<packageName>org.apache.nifi.authorization.file.generated</packageName>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
@ -53,10 +53,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>**/authorization/generated/*.java</excludes>
|
||||
<excludes>**/authorization/file/generated/*.java</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
|
|
|
@ -20,9 +20,9 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.apache.nifi.authorization.annotation.AuthorizerContext;
|
||||
import org.apache.nifi.authorization.exception.AuthorizationAccessException;
|
||||
import org.apache.nifi.authorization.exception.AuthorizerCreationException;
|
||||
import org.apache.nifi.authorization.generated.Authorization;
|
||||
import org.apache.nifi.authorization.generated.Resource;
|
||||
import org.apache.nifi.authorization.generated.Resources;
|
||||
import org.apache.nifi.authorization.file.generated.Authorization;
|
||||
import org.apache.nifi.authorization.file.generated.Resources;
|
||||
import org.apache.nifi.authorization.file.generated.Resource;
|
||||
import org.apache.nifi.components.PropertyValue;
|
||||
import org.apache.nifi.util.NiFiProperties;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
|
@ -62,7 +62,7 @@ public class FileAuthorizer implements Authorizer {
|
|||
private static final String READ_CODE = "R";
|
||||
private static final String WRITE_CODE = "W";
|
||||
private static final String USERS_XSD = "/authorizations.xsd";
|
||||
private static final String JAXB_GENERATED_PATH = "org.apache.nifi.authorization.generated";
|
||||
private static final String JAXB_GENERATED_PATH = "org.apache.nifi.authorization.file.generated";
|
||||
private static final JAXBContext JAXB_CONTEXT = initializeJaxbContext();
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
must be specified in the nifi.properties file.
|
||||
-->
|
||||
<authorizers>
|
||||
<provider>
|
||||
<authorizer>
|
||||
<identifier>file-provider</identifier>
|
||||
<class>org.apache.nifi.authorization.FileAuthorizer</class>
|
||||
<property name="Authorizations File">./conf/authorizations.xml</property>
|
||||
<property name="Reload Interval">30 secs</property>
|
||||
</provider>
|
||||
</authorizer>
|
||||
</authorizers>
|
|
@ -113,6 +113,11 @@
|
|||
<artifactId>nifi-documentation</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-file-authorizer</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue