http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java index 6d0c3cb..a74c75e 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java @@ -1,251 +1,251 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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 org.apache.nifi.web.security.authorization; - -import org.apache.nifi.admin.service.AccountDisabledException; -import org.apache.nifi.admin.service.AccountNotFoundException; -import org.apache.nifi.admin.service.AccountPendingException; -import org.apache.nifi.admin.service.AdministrationException; -import org.apache.nifi.admin.service.UserService; -import org.apache.nifi.authorization.Authority; -import org.apache.nifi.user.NiFiUser; -import org.apache.nifi.util.NiFiProperties; -import org.apache.nifi.web.security.DnUtils; -import org.apache.nifi.web.security.UntrustedProxyException; -import org.apache.nifi.web.security.user.NiFiUserDetails; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mockito; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; -import org.springframework.security.authentication.AccountStatusException; -import org.springframework.security.authentication.AuthenticationServiceException; -import org.springframework.security.core.userdetails.UsernameNotFoundException; - -/** - * Test case for NiFiAuthorizationService. - */ -public class NiFiAuthorizationServiceTest { - - private static final String USER = "user"; - private static final String PROXY = "proxy"; - private static final String PROXY_PROXY = "proxy-proxy"; - private static final String USER_NOT_FOUND = "user-not-found"; - private static final String USER_DISABLED = "user-disabled"; - private static final String USER_PENDING = "user-pending"; - private static final String USER_ADMIN_EXCEPTION = "user-admin-exception"; - private static final String PROXY_NOT_FOUND = "proxy-not-found"; - - private NiFiAuthorizationService authorizationService; - private UserService userService; - - @Before - public void setup() throws Exception { - // mock the web security properties - final NiFiProperties properties = Mockito.mock(NiFiProperties.class); - Mockito.when(properties.getSupportNewAccountRequests()).thenReturn(Boolean.TRUE); - - userService = Mockito.mock(UserService.class); - Mockito.doReturn(null).when(userService).createPendingUserAccount(Mockito.anyString(), Mockito.anyString()); - Mockito.doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] args = invocation.getArguments(); - String dn = (String) args[0]; - - if (null != dn) { - switch (dn) { - case USER_NOT_FOUND: - case PROXY_NOT_FOUND: - throw new AccountNotFoundException(""); - case USER_DISABLED: - throw new AccountDisabledException(""); - case USER_PENDING: - throw new AccountPendingException(""); - case USER_ADMIN_EXCEPTION: - throw new AdministrationException(); - case USER: - final NiFiUser monitor = new NiFiUser(); - monitor.setDn(dn); - monitor.getAuthorities().add(Authority.ROLE_MONITOR); - return monitor; - case PROXY: - case PROXY_PROXY: - final NiFiUser proxy = new NiFiUser(); - proxy.setDn(dn); - proxy.getAuthorities().add(Authority.ROLE_PROXY); - return proxy; - } - } - - return null; - } - }).when(userService).checkAuthorization(Mockito.anyString()); - - // create the authorization service - authorizationService = new NiFiAuthorizationService(); - authorizationService.setProperties(properties); - authorizationService.setUserService(userService); - } - - /** - * Ensures the authorization service correctly handles users invalid dn - * chain. - * - * @throws Exception ex - */ - @Test(expected = UntrustedProxyException.class) - public void testInvalidDnChain() throws Exception { - authorizationService.loadUserByUsername(USER); - } - - /** - * Ensures the authorization service correctly handles account not found. - * - * @throws Exception ex - */ - @Test(expected = UsernameNotFoundException.class) - public void testAccountNotFound() throws Exception { - authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER_NOT_FOUND)); - } - - /** - * Ensures the authorization service correctly handles account disabled. - * - * @throws Exception ex - */ - @Test(expected = AccountStatusException.class) - public void testAccountDisabled() throws Exception { - authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER_DISABLED)); - } - - /** - * Ensures the authorization service correctly handles account pending. - * - * @throws Exception ex - */ - @Test(expected = AccountStatusException.class) - public void testAccountPending() throws Exception { - authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER_PENDING)); - } - - /** - * Ensures the authorization service correctly handles account - * administration exception. - * - * @throws Exception ex - */ - @Test(expected = AuthenticationServiceException.class) - public void testAccountAdminException() throws Exception { - authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER_ADMIN_EXCEPTION)); - } - - /** - * Tests the case when there is no proxy. - * - * @throws Exception ex - */ - @Test - public void testNoProxy() throws Exception { - final NiFiUserDetails details = (NiFiUserDetails) authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER)); - final NiFiUser user = details.getNiFiUser(); - - Assert.assertEquals(USER, user.getDn()); - Assert.assertNull(user.getChain()); - } - - /** - * Tests the case when the proxy does not have ROLE_PROXY. - * - * @throws Exception ex - */ - @Test(expected = UntrustedProxyException.class) - public void testInvalidProxy() throws Exception { - final String dnChain = DnUtils.formatProxyDn(USER) + DnUtils.formatProxyDn(USER); - authorizationService.loadUserByUsername(dnChain); - } - - /** - * Ensures the authorization service correctly handles proxy not found by - * attempting to create an account request for the proxy. - * - * @throws Exception ex - */ - @Test(expected = UsernameNotFoundException.class) - public void testProxyNotFound() throws Exception { - try { - final String dnChain = DnUtils.formatProxyDn(USER) + DnUtils.formatProxyDn(PROXY_NOT_FOUND); - authorizationService.loadUserByUsername(DnUtils.formatProxyDn(dnChain)); - } finally { - Mockito.verify(userService).createPendingUserAccount(Mockito.eq(PROXY_NOT_FOUND), Mockito.anyString()); - } - } - - /** - * Tests the case when there is a proxy. - * - * @throws Exception ex - */ - @Test - public void testProxy() throws Exception { - final String dnChain = DnUtils.formatProxyDn(USER) + DnUtils.formatProxyDn(PROXY); - final NiFiUserDetails details = (NiFiUserDetails) authorizationService.loadUserByUsername(dnChain); - final NiFiUser user = details.getNiFiUser(); - - // verify the user - Assert.assertEquals(USER, user.getDn()); - Assert.assertNotNull(user.getChain()); - - // get the proxy - final NiFiUser proxy = user.getChain(); - - // verify the proxy - Assert.assertEquals(PROXY, proxy.getDn()); - Assert.assertNull(proxy.getChain()); - } - - /** - * Tests the case when there is are multiple proxies. - * - * @throws Exception ex - */ - @Test - public void testProxyProxy() throws Exception { - final String dnChain = DnUtils.formatProxyDn(USER) + DnUtils.formatProxyDn(PROXY) + DnUtils.formatProxyDn(PROXY_PROXY); - final NiFiUserDetails details = (NiFiUserDetails) authorizationService.loadUserByUsername(dnChain); - final NiFiUser user = details.getNiFiUser(); - - // verify the user - Assert.assertEquals(USER, user.getDn()); - Assert.assertNotNull(user.getChain()); - - // get the proxy - NiFiUser proxy = user.getChain(); - - // verify the proxy - Assert.assertEquals(PROXY, proxy.getDn()); - Assert.assertNotNull(proxy.getChain()); - - // get the proxies proxy - proxy = proxy.getChain(); - - // verify the proxies proxy - Assert.assertEquals(PROXY_PROXY, proxy.getDn()); - Assert.assertNull(proxy.getChain()); - } -} +///* +// * Licensed to the Apache Software Foundation (ASF) under one or more +// * contributor license agreements. See the NOTICE file distributed with +// * this work for additional information regarding copyright ownership. +// * The ASF licenses this file to You 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 org.apache.nifi.web.security.authorization; +// +//import org.apache.nifi.admin.service.AccountDisabledException; +//import org.apache.nifi.admin.service.AccountNotFoundException; +//import org.apache.nifi.admin.service.AccountPendingException; +//import org.apache.nifi.admin.service.AdministrationException; +//import org.apache.nifi.admin.service.UserService; +//import org.apache.nifi.authorization.Authority; +//import org.apache.nifi.user.NiFiUser; +//import org.apache.nifi.util.NiFiProperties; +//import org.apache.nifi.web.security.ProxiedEntitiesUtils; +//import org.apache.nifi.web.security.UntrustedProxyException; +//import org.apache.nifi.web.security.user.NiFiUserDetails; +//import org.junit.Assert; +//import org.junit.Before; +//import org.junit.Test; +//import org.mockito.Mockito; +//import org.mockito.invocation.InvocationOnMock; +//import org.mockito.stubbing.Answer; +//import org.springframework.security.authentication.AccountStatusException; +//import org.springframework.security.authentication.AuthenticationServiceException; +//import org.springframework.security.core.userdetails.UsernameNotFoundException; +// +///** +// * Test case for NiFiAuthorizationService. +// */ +//public class NiFiAuthorizationServiceTest { +// +// private static final String USER = "user"; +// private static final String PROXY = "proxy"; +// private static final String PROXY_PROXY = "proxy-proxy"; +// private static final String USER_NOT_FOUND = "user-not-found"; +// private static final String USER_DISABLED = "user-disabled"; +// private static final String USER_PENDING = "user-pending"; +// private static final String USER_ADMIN_EXCEPTION = "user-admin-exception"; +// private static final String PROXY_NOT_FOUND = "proxy-not-found"; +// +// private NiFiAuthorizationService authorizationService; +// private UserService userService; +// +// @Before +// public void setup() throws Exception { +// // mock the web security properties +// final NiFiProperties properties = Mockito.mock(NiFiProperties.class); +// Mockito.when(properties.getSupportNewAccountRequests()).thenReturn(Boolean.TRUE); +// +// userService = Mockito.mock(UserService.class); +// Mockito.doReturn(null).when(userService).createPendingUserAccount(Mockito.anyString(), Mockito.anyString()); +// Mockito.doAnswer(new Answer() { +// @Override +// public Object answer(InvocationOnMock invocation) throws Throwable { +// Object[] args = invocation.getArguments(); +// String dn = (String) args[0]; +// +// if (null != dn) { +// switch (dn) { +// case USER_NOT_FOUND: +// case PROXY_NOT_FOUND: +// throw new AccountNotFoundException(""); +// case USER_DISABLED: +// throw new AccountDisabledException(""); +// case USER_PENDING: +// throw new AccountPendingException(""); +// case USER_ADMIN_EXCEPTION: +// throw new AdministrationException(); +// case USER: +// final NiFiUser monitor = new NiFiUser(); +// monitor.setDn(dn); +// monitor.getAuthorities().add(Authority.ROLE_MONITOR); +// return monitor; +// case PROXY: +// case PROXY_PROXY: +// final NiFiUser proxy = new NiFiUser(); +// proxy.setDn(dn); +// proxy.getAuthorities().add(Authority.ROLE_PROXY); +// return proxy; +// } +// } +// +// return null; +// } +// }).when(userService).checkAuthorization(Mockito.anyString()); +// +// // create the authorization service +// authorizationService = new NiFiAuthorizationService(); +// authorizationService.setProperties(properties); +// authorizationService.setUserService(userService); +// } +// +// /** +// * Ensures the authorization service correctly handles users invalid dn +// * chain. +// * +// * @throws Exception ex +// */ +// @Test(expected = UntrustedProxyException.class) +// public void testInvalidDnChain() throws Exception { +// authorizationService.loadUserByUsername(USER); +// } +// +// /** +// * Ensures the authorization service correctly handles account not found. +// * +// * @throws Exception ex +// */ +// @Test(expected = UsernameNotFoundException.class) +// public void testAccountNotFound() throws Exception { +// authorizationService.loadUserByUsername(ProxiedEntitiesUtils.formatProxyDn(USER_NOT_FOUND)); +// } +// +// /** +// * Ensures the authorization service correctly handles account disabled. +// * +// * @throws Exception ex +// */ +// @Test(expected = AccountStatusException.class) +// public void testAccountDisabled() throws Exception { +// authorizationService.loadUserByUsername(ProxiedEntitiesUtils.formatProxyDn(USER_DISABLED)); +// } +// +// /** +// * Ensures the authorization service correctly handles account pending. +// * +// * @throws Exception ex +// */ +// @Test(expected = AccountStatusException.class) +// public void testAccountPending() throws Exception { +// authorizationService.loadUserByUsername(ProxiedEntitiesUtils.formatProxyDn(USER_PENDING)); +// } +// +// /** +// * Ensures the authorization service correctly handles account +// * administration exception. +// * +// * @throws Exception ex +// */ +// @Test(expected = AuthenticationServiceException.class) +// public void testAccountAdminException() throws Exception { +// authorizationService.loadUserByUsername(ProxiedEntitiesUtils.formatProxyDn(USER_ADMIN_EXCEPTION)); +// } +// +// /** +// * Tests the case when there is no proxy. +// * +// * @throws Exception ex +// */ +// @Test +// public void testNoProxy() throws Exception { +// final NiFiUserDetails details = (NiFiUserDetails) authorizationService.loadUserByUsername(ProxiedEntitiesUtils.formatProxyDn(USER)); +// final NiFiUser user = details.getNiFiUser(); +// +// Assert.assertEquals(USER, user.getDn()); +// Assert.assertNull(user.getChain()); +// } +// +// /** +// * Tests the case when the proxy does not have ROLE_PROXY. +// * +// * @throws Exception ex +// */ +// @Test(expected = UntrustedProxyException.class) +// public void testInvalidProxy() throws Exception { +// final String dnChain = ProxiedEntitiesUtils.formatProxyDn(USER) + ProxiedEntitiesUtils.formatProxyDn(USER); +// authorizationService.loadUserByUsername(dnChain); +// } +// +// /** +// * Ensures the authorization service correctly handles proxy not found by +// * attempting to create an account request for the proxy. +// * +// * @throws Exception ex +// */ +// @Test(expected = UsernameNotFoundException.class) +// public void testProxyNotFound() throws Exception { +// try { +// final String dnChain = ProxiedEntitiesUtils.formatProxyDn(USER) + ProxiedEntitiesUtils.formatProxyDn(PROXY_NOT_FOUND); +// authorizationService.loadUserByUsername(ProxiedEntitiesUtils.formatProxyDn(dnChain)); +// } finally { +// Mockito.verify(userService).createPendingUserAccount(Mockito.eq(PROXY_NOT_FOUND), Mockito.anyString()); +// } +// } +// +// /** +// * Tests the case when there is a proxy. +// * +// * @throws Exception ex +// */ +// @Test +// public void testProxy() throws Exception { +// final String dnChain = ProxiedEntitiesUtils.formatProxyDn(USER) + ProxiedEntitiesUtils.formatProxyDn(PROXY); +// final NiFiUserDetails details = (NiFiUserDetails) authorizationService.loadUserByUsername(dnChain); +// final NiFiUser user = details.getNiFiUser(); +// +// // verify the user +// Assert.assertEquals(USER, user.getDn()); +// Assert.assertNotNull(user.getChain()); +// +// // get the proxy +// final NiFiUser proxy = user.getChain(); +// +// // verify the proxy +// Assert.assertEquals(PROXY, proxy.getDn()); +// Assert.assertNull(proxy.getChain()); +// } +// +// /** +// * Tests the case when there is are multiple proxies. +// * +// * @throws Exception ex +// */ +// @Test +// public void testProxyProxy() throws Exception { +// final String dnChain = ProxiedEntitiesUtils.formatProxyDn(USER) + ProxiedEntitiesUtils.formatProxyDn(PROXY) + ProxiedEntitiesUtils.formatProxyDn(PROXY_PROXY); +// final NiFiUserDetails details = (NiFiUserDetails) authorizationService.loadUserByUsername(dnChain); +// final NiFiUser user = details.getNiFiUser(); +// +// // verify the user +// Assert.assertEquals(USER, user.getDn()); +// Assert.assertNotNull(user.getChain()); +// +// // get the proxy +// NiFiUser proxy = user.getChain(); +// +// // verify the proxy +// Assert.assertEquals(PROXY, proxy.getDn()); +// Assert.assertNotNull(proxy.getChain()); +// +// // get the proxies proxy +// proxy = proxy.getChain(); +// +// // verify the proxies proxy +// Assert.assertEquals(PROXY_PROXY, proxy.getDn()); +// Assert.assertNull(proxy.getChain()); +// } +//}
http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml index 08218f6..c346a28 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml @@ -32,6 +32,7 @@ <templates.filter>templates.properties</templates.filter> <users.filter>users.properties</users.filter> <bulletin.board.filter>bulletin-board.properties</bulletin.board.filter> + <login.filter>login.properties</login.filter> <provenance.filter>provenance.properties</provenance.filter> </properties> <build> @@ -54,6 +55,7 @@ <filter>src/main/resources/filters/${templates.filter}</filter> <filter>src/main/resources/filters/${users.filter}</filter> <filter>src/main/resources/filters/${bulletin.board.filter}</filter> + <filter>src/main/resources/filters/${login.filter}</filter> <filter>src/main/resources/filters/${provenance.filter}</filter> </filters> <plugins> @@ -89,7 +91,8 @@ **/cluster.jsp, **/templates.jsp, **/users.jsp, - **/bulletin-board.jsp + **/bulletin-board.jsp, + **/login.jsp </excludes> </configuration> </execution> @@ -209,6 +212,14 @@ </includes> <filtering>true</filtering> </resource> + <resource> + <directory>src/main/webapp/WEB-INF/pages</directory> + <targetPath>WEB-INF/pages</targetPath> + <includes> + <include>login.jsp</include> + </includes> + <filtering>true</filtering> + </resource> </webResources> </configuration> </plugin> @@ -229,6 +240,7 @@ <templates.filter>templates-min.properties</templates.filter> <users.filter>users-min.properties</users.filter> <bulletin.board.filter>bulletin-board-min.properties</bulletin.board.filter> + <login.filter>login-min.properties</login.filter> <provenance.filter>provenance-min.properties</provenance.filter> </properties> <build> @@ -403,6 +415,16 @@ </aggregation> <aggregation> <insertNewLine>true</insertNewLine> + <output>${project.build.directory}/${project.build.finalName}/js/nf/login/nf-login-all.js</output> + <includes> + <include>${staging.dir}/js/nf/nf-client.js</include> + <include>${staging.dir}/js/nf/nf-common.js</include> + <include>${staging.dir}/js/nf/nf-dialog.js</include> + <include>${staging.dir}/js/nf/login/nf-login.js</include> + </includes> + </aggregation> + <aggregation> + <insertNewLine>true</insertNewLine> <output>${project.build.directory}/${project.build.finalName}/css/nf-canvas-all.css</output> <includes> <include>${staging.dir}/css/reporting-task.css</include> @@ -517,6 +539,16 @@ <include>${staging.dir}/css/bulletin-board.css</include> </includes> </aggregation> + <aggregation> + <insertNewLine>true</insertNewLine> + <output>${project.build.directory}/${project.build.finalName}/css/nf-login-all.css</output> + <includes> + <include>${staging.dir}/css/main.css</include> + <include>${staging.dir}/css/banner.css</include> + <include>${staging.dir}/css/dialog.css</include> + <include>${staging.dir}/css/login.css</include> + </includes> + </aggregation> </aggregations> </configuration> </execution> @@ -556,6 +588,8 @@ css/nf-users-all.css.gz, css/nf-bulletin-board-all.css, css/nf-bulletin-board-all.css.gz, + css/nf-login-all.css, + css/nf-login-all.css.gz, js/*, js/d3/**/*, js/codemirror/**/*, @@ -584,6 +618,8 @@ js/nf/users/nf-users-all.js.gz, js/nf/bulletin-board/nf-bulletin-board-all.js, js/nf/bulletin-board/nf-bulletin-board-all.js.gz, + js/nf/login/nf-login-all.js, + js/nf/login/nf-login-all.js.gz, images/*, resources/*, images/*, @@ -615,7 +651,6 @@ the application classpath or the maven jetty plugin classpath defined above. --> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> @@ -651,6 +686,25 @@ <artifactId>javax.servlet.jsp.jstl-api</artifactId> <scope>provided</scope> </dependency> - + <dependency> + <groupId>org.apache.nifi</groupId> + <artifactId>nifi-web-security</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.springframework.security</groupId> + <artifactId>spring-security-core</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.springframework.security</groupId> + <artifactId>spring-security-web</artifactId> + <scope>provided</scope> + </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/java/org/apache/nifi/web/NiFiWebUiConfiguration.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/java/org/apache/nifi/web/NiFiWebUiConfiguration.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/java/org/apache/nifi/web/NiFiWebUiConfiguration.java new file mode 100644 index 0000000..320655a --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/java/org/apache/nifi/web/NiFiWebUiConfiguration.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 org.apache.nifi.web; + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.context.annotation.ImportResource; + +/** + * + */ +@Configuration +@Import({NiFiWebUiSecurityConfiguration.class}) +@ImportResource({"classpath:nifi-context.xml", + "classpath:nifi-administration-context.xml", + "classpath:nifi-cluster-manager-context.xml", + "classpath:nifi-cluster-protocol-context.xml", + "classpath:nifi-web-security-context.xml"}) +public class NiFiWebUiConfiguration { + +} http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/java/org/apache/nifi/web/NiFiWebUiSecurityConfiguration.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/java/org/apache/nifi/web/NiFiWebUiSecurityConfiguration.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/java/org/apache/nifi/web/NiFiWebUiSecurityConfiguration.java new file mode 100644 index 0000000..46b90d0 --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/java/org/apache/nifi/web/NiFiWebUiSecurityConfiguration.java @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 org.apache.nifi.web; + +import org.apache.nifi.web.security.form.LoginAuthenticationFilter; +import org.apache.nifi.web.security.jwt.JwtService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; + +/** + * NiFi Web Ui Security Config + */ +@Configuration +@EnableWebSecurity +public class NiFiWebUiSecurityConfiguration extends WebSecurityConfigurerAdapter { + + public NiFiWebUiSecurityConfiguration() { + super(true); // disable defaults + } + + private JwtService jwtService; + + @Override + protected void configure(final HttpSecurity http) throws Exception { + http + .addFilterBefore(buildFormLoginFilter(), UsernamePasswordAuthenticationFilter.class) + .sessionManagement() + .sessionCreationPolicy(SessionCreationPolicy.STATELESS); + } + + private LoginAuthenticationFilter buildFormLoginFilter() throws Exception { + final LoginAuthenticationFilter loginFilter = new LoginAuthenticationFilter("/token"); + loginFilter.setJwtService(jwtService); + return loginFilter; + } + + @Autowired + public void configureGlobal(final AuthenticationManagerBuilder auth) throws Exception { + auth + .inMemoryAuthentication() + .withUser("gilman").password("password").roles("USER"); + } + + @Autowired + public void setJwtService(JwtService jwtService) { + this.jwtService = jwtService; + } + +} http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/login-min.properties ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/login-min.properties b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/login-min.properties new file mode 100644 index 0000000..4dafb02 --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/login-min.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +nf.login.script.tags=<script type="text/javascript" src="js/nf/login/nf-login-all.js?${project.version}"></script> +nf.login.style.tags=<link rel="stylesheet" href="css/nf-login-all.css?${project.version}" type="text/css" />\n\ +<link rel="stylesheet" href="css/message-pane.css?${project.version}" type="text/css" /> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/login.properties ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/login.properties b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/login.properties new file mode 100644 index 0000000..5b36c17 --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/login.properties @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +nf.login.script.tags=<script type="text/javascript" src="js/nf/nf-common.js?${project.version}"></script>\n\ +<script type="text/javascript" src="js/nf/nf-dialog.js?${project.version}"></script>\n\ +<script type="text/javascript" src="js/nf/login/nf-login.js?${project.version}"></script> +nf.login.style.tags=<link rel="stylesheet" href="css/reset.css?${project.version}" type="text/css" />\n\ +<link rel="stylesheet" href="css/main.css?${project.version}" type="text/css" />\n\ +<link rel="stylesheet" href="css/banner.css?${project.version}" type="text/css" />\n\ +<link rel="stylesheet" href="css/dialog.css?${project.version}" type="text/css" />\n\ +<link rel="stylesheet" href="css/message-pane.css?${project.version}" type="text/css" />\n\ +<link rel="stylesheet" href="css/login.css?${project.version}" type="text/css" /> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/login.jsp ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/login.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/login.jsp new file mode 100644 index 0000000..c54f1fd --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/login.jsp @@ -0,0 +1,49 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--%> +<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %> +<!DOCTYPE html> +<html> + <head> + <title>NiFi Login</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="shortcut icon" href="images/nifi16.ico"/> + <link rel="stylesheet" href="css/reset.css" type="text/css" /> + ${nf.login.style.tags} + <link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" /> + <link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" /> + <link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" /> + <script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script> + <script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script> + <script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script> + <script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script> + <script type="text/javascript" src="js/nf/nf-namespace.js?${project.version}"></script> + ${nf.login.script.tags} + </head> + <body> + <form name="loginForm" action="token" method="post"> + <legend>Please Login</legend> + <label for="username">Username</label> + <input type="text" id="username" name="username" value="${username}"/> + <br> + <label for="password">Password</label> + <input type="password" id="password" name="password"/> + <div class="form-actions"> + <button type="submit" class="btn">Log in</button> + </div> + </form> + </body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/canvas-header.jsp ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/canvas-header.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/canvas-header.jsp index f312327..b4ae7d5 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/canvas-header.jsp +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/canvas-header.jsp @@ -50,6 +50,9 @@ <li> <span id="about-link" class="link">about</span> </li> + <li> + <span id="login-link" class="link">login</span> + </li> </ul> </div> </div> http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/web.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/web.xml index d0a5e39..561bd39 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/web.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/web.xml @@ -16,19 +16,31 @@ <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <display-name>nifi</display-name> - <!-- servlet to map to canvas page --> + <!-- spring secutiry configuration --> + <context-param> + <param-name>contextClass</param-name> + <param-value>org.springframework.web.context.support.AnnotationConfigWebApplicationContext</param-value> + </context-param> + <context-param> + <param-name>contextConfigLocation</param-name> + <param-value>org.apache.nifi.web</param-value> + </context-param> + <listener> + <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> + </listener> + <!-- servlet to map to canvas page --> <servlet> <servlet-name>NiFiCanvas</servlet-name> <jsp-file>/WEB-INF/pages/canvas.jsp</jsp-file> </servlet> <servlet-mapping> <servlet-name>NiFiCanvas</servlet-name> + <!--<url-pattern>/token</url-pattern>--> <url-pattern>/canvas</url-pattern> </servlet-mapping> <!-- servlet to map to summary page --> - <servlet> <servlet-name>NiFiSummary</servlet-name> <jsp-file>/WEB-INF/pages/summary.jsp</jsp-file> @@ -39,7 +51,6 @@ </servlet-mapping> <!-- servlet to map to history page --> - <servlet> <servlet-name>NiFiHistory</servlet-name> <jsp-file>/WEB-INF/pages/history.jsp</jsp-file> @@ -50,7 +61,6 @@ </servlet-mapping> <!-- servlet to map to provenance page --> - <servlet> <servlet-name>NiFiProvenance</servlet-name> <jsp-file>/WEB-INF/pages/provenance.jsp</jsp-file> @@ -61,7 +71,6 @@ </servlet-mapping> <!-- servlet to map to counters page --> - <servlet> <servlet-name>NiFiCounters</servlet-name> <jsp-file>/WEB-INF/pages/counters.jsp</jsp-file> @@ -72,7 +81,6 @@ </servlet-mapping> <!-- servlet to map to templates page --> - <servlet> <servlet-name>NiFiTemplates</servlet-name> <jsp-file>/WEB-INF/pages/templates.jsp</jsp-file> @@ -83,7 +91,6 @@ </servlet-mapping> <!-- servlet to map to users page --> - <servlet> <servlet-name>NiFiUsers</servlet-name> <jsp-file>/WEB-INF/pages/users.jsp</jsp-file> @@ -94,7 +101,6 @@ </servlet-mapping> <!-- servlet to map to cluster page --> - <servlet> <servlet-name>NiFiCluster</servlet-name> <jsp-file>/WEB-INF/pages/cluster.jsp</jsp-file> @@ -105,7 +111,6 @@ </servlet-mapping> <!-- servlet to map to bulletin board page --> - <servlet> <servlet-name>BulletinBoard</servlet-name> <jsp-file>/WEB-INF/pages/bulletin-board.jsp</jsp-file> @@ -116,7 +121,6 @@ </servlet-mapping> <!-- servlet to support message page --> - <servlet> <servlet-name>MessagePage</servlet-name> <jsp-file>/WEB-INF/pages/message-page.jsp</jsp-file> @@ -127,7 +131,6 @@ </servlet-mapping> <!-- servlet to support image downloading --> - <servlet> <servlet-name>DownloadSvg</servlet-name> <servlet-class>org.apache.nifi.web.servlet.DownloadSvg</servlet-class> @@ -137,6 +140,16 @@ <url-pattern>/download-svg</url-pattern> </servlet-mapping> + <!-- servlet to login page --> + <servlet> + <servlet-name>Login</servlet-name> + <jsp-file>/WEB-INF/pages/login.jsp</jsp-file> + </servlet> + <servlet-mapping> + <servlet-name>Login</servlet-name> + <url-pattern>/login</url-pattern> + </servlet-mapping> + <filter> <filter-name>IeEdgeHeader</filter-name> <filter-class>org.apache.nifi.web.filter.IeEdgeHeader</filter-class> @@ -146,6 +159,15 @@ <url-pattern>/*</url-pattern> </filter-mapping> + <filter> + <filter-name>springSecurityFilterChain</filter-name> + <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> + </filter> + <filter-mapping> + <filter-name>springSecurityFilterChain</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + <welcome-file-list> <welcome-file>canvas.jsp</welcome-file> <welcome-file>/WEB-INF/pages/canvas.jsp</welcome-file> http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/login.css ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/login.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/login.css new file mode 100644 index 0000000..203f5b9 --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/login.css @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +/* + Login Styles +*/ \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js index 5cc1eff..e4f8977 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js @@ -138,6 +138,11 @@ nf.CanvasHeader = (function () { $('#help-link').click(function () { nf.Shell.showPage(config.urls.helpDocument); }); + + // login link + $('#login-link').click(function () { + nf.Shell.showPage('login', false); + }); // initialize the new template dialog $('#new-template-dialog').modal({ http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js new file mode 100644 index 0000000..a6d9b23 --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +/* global nf, top */ + +$(document).ready(function () { + nf.Login.init(); +}); + +nf.Login = (function () { + var initializePage = function () { + return $.Deferred(function (deferred) { + console.log('hello there'); + deferred.resolve(); + }); + }; + + return { + /** + * Initializes the login page. + */ + init: function () { + initializePage().done(function () { + }); + } + }; +}()); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml index b6f3f9c..6709e84 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml @@ -40,6 +40,8 @@ <module>nifi-web</module> <module>nifi-resources</module> <module>nifi-documentation</module> + <module>nifi-authorized-users</module> + <module>nifi-file-identity-provider</module> </modules> <dependencies> <dependency> http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/nifi-nar-bundles/nifi-framework-bundle/pom.xml ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/pom.xml index f78e497..a81a832 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/pom.xml @@ -45,6 +45,11 @@ </dependency> <dependency> <groupId>org.apache.nifi</groupId> + <artifactId>nifi-file-identity-provider</artifactId> + <version>0.3.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.nifi</groupId> <artifactId>nifi-cluster-authorization-provider</artifactId> <version>0.3.1-SNAPSHOT</version> </dependency> @@ -60,6 +65,11 @@ </dependency> <dependency> <groupId>org.apache.nifi</groupId> + <artifactId>nifi-authorized-users</artifactId> + <version>0.3.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.nifi</groupId> <artifactId>nifi-client-dto</artifactId> <version>0.3.1-SNAPSHOT</version> </dependency> http://git-wip-us.apache.org/repos/asf/nifi/blob/a40e5a07/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 74dc4a9..ffb21a8 100644 --- a/pom.xml +++ b/pom.xml @@ -91,7 +91,7 @@ <jetty.version>9.2.11.v20150529</jetty.version> <lucene.version>4.10.4</lucene.version> <spring.version>4.1.6.RELEASE</spring.version> - <spring.security.version>3.2.7.RELEASE</spring.security.version> + <spring.security.version>4.0.2.RELEASE</spring.security.version> <jersey.version>1.19</jersey.version> <hadoop.version>2.6.0</hadoop.version> <yammer.metrics.version>2.2.0</yammer.metrics.version>
