mirror of https://github.com/apache/nifi.git
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop
This commit is contained in:
commit
c69e4dbec6
384
LICENSE
384
LICENSE
|
@ -200,3 +200,387 @@
|
|||
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.
|
||||
|
||||
APACHE NIFI SUBCOMPONENTS:
|
||||
|
||||
The Apache NiFi project contains subcomponents with separate copyright
|
||||
notices and license terms. Your use of the source code for the these
|
||||
subcomponents is subject to the terms and conditions of the following
|
||||
licenses.
|
||||
|
||||
The binary distribution of this product bundles 'Antlr 3' which is available
|
||||
under a "3-clause BSD" license. For details see http://www.antlr3.org/license.html
|
||||
|
||||
Copyright (c) 2010 Terence Parr
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
Neither the name of the author nor the names of its contributors may be used
|
||||
to endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The binary distribution of this product bundles 'Paranamer Core' which is
|
||||
available under a "3-clause BSD" license.
|
||||
For details see http://paranamer.codehaus.org/paranamer
|
||||
|
||||
Copyright (c) 2006 Paul Hammant & ThoughtWorks Inc
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The binary distribution of this product bundles 'xmlenc Library' which is
|
||||
available under The BSD 2-Clause license found here:
|
||||
http://www.opensource.org/licenses/bsd-license.php
|
||||
For details http://xmlenc.sourceforge.net
|
||||
|
||||
The binary distribution of this product bundles 'Protocol Buffer Java API'
|
||||
which is available under The BSD 2-Clause license found here:
|
||||
http://www.opensource.org/licenses/bsd-license.php
|
||||
For details http://code.google.com/p/protobuf
|
||||
|
||||
The binary distribution of this product bundles 'JZlib' which is
|
||||
available under a "3-clause BSD" license.
|
||||
For details see http://www.jcraft.com/jzlib/
|
||||
|
||||
Copyright (c) 2000-2011 ymnk, JCraft,Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The names of the authors may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
||||
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The binary distribution of this product bundles 'JSch' which is
|
||||
available under a "3-clause BSD" license.
|
||||
For details see http://www.jcraft.com/jsch/
|
||||
|
||||
Copyright (c) 2002-2014 Atsuhiko Yamanaka, JCraft,Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The names of the authors may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
||||
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
This product bundles 'Javascript D3 Library' which is available under a
|
||||
"3-clause BSD" license. For details see http://d3js.org/
|
||||
|
||||
Copyright (c) 2010-2014, Michael Bostock
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* The name Michael Bostock may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The binary distribution of this product bundles 'BouncyCastle Provider'
|
||||
which is available under an MIT style license.
|
||||
For details see http://www.bouncycastle.org/java.html
|
||||
|
||||
Copyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
||||
The binary distribution of this product bundles 'SLF4J' which is available
|
||||
under an MIT style license.
|
||||
For details see http://www.qos.ch
|
||||
|
||||
Copyright (c) 2004-2013 QOS.ch
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
This product bundles 'jQuery Grid' which is available under the MIT License.
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
For details see http://jqgrid.com/
|
||||
Copyright (c) 2008, Tony Tomov, tony@trirand.com
|
||||
|
||||
This product bundles 'CodeMirror' which is available under an MIT style license.
|
||||
For details see http://codemirror.net/doc/compress.html
|
||||
|
||||
Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
This product bundles 'jQuery UI' which is available under an MIT style license.
|
||||
For details see http://jqueryui.com
|
||||
|
||||
Copyright 2014 jQuery Foundation and other contributors,
|
||||
http://jqueryui.com/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
|
||||
contribution history, see the revision history and logs, available
|
||||
at http://jquery-ui.googlecode.com/svn/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
This product bundles 'SLICKGRID' which is available under an MIT style license.
|
||||
For details see http://github.com/mleibman/slickgrid
|
||||
Copyright (c) 2010 Michael Leibman, http://github.com/mleibman/slickgrid
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
This product bundles 'qTip2' which is available under an MIT style license.
|
||||
For details see http://qtip2.com
|
||||
|
||||
Copyright (c) 2012 Craig Michael Thompson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
This product bundles 'jQuery MiniColors' which is available under the MIT License.
|
||||
http://opensource.org/licenses/MIT
|
||||
For details see http://www.abeautifulsite.net/
|
||||
Copyright Cory LaViska for A Beautiful Site, LLC. (http://www.abeautifulsite.net/)
|
||||
|
||||
The binary distribution of this product bundles the following libraries:
|
||||
Expression Languagee 3.0 API, JavaServer Pages(TM) API,
|
||||
JavaServer Pages(TM) Standard Tag Library API, Expression Language 3.0,
|
||||
JSP implementation, JavaServer Pages (TM) TagLib Implementation,
|
||||
Java Servlet API
|
||||
which are all available under the CDDL 1.0 License.
|
||||
https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html
|
||||
For details see https://glassfish.java.net/
|
||||
Copyright (c) 2010-2014 Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
The binary distribution of this product bundles the following libraries:
|
||||
jersey-core, jersey-json, jersey-server, jersey-servlet, jersey-multipart,
|
||||
jersey-spring, JAXB RI, JAXB API bundle for GlassFish V3,
|
||||
MIME streaming extension, JavaMail API (compat)
|
||||
which are all available under the CDDL 1.1 License.
|
||||
http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
For details see https://glassfish.java.net/
|
||||
Copyright (c) 2010-2014 Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
The binary distribution of this product bundles 'H2 Database' which is available
|
||||
under the MPL 2.0 license.
|
||||
http://www.h2database.com/html/license.html#mpl2
|
||||
For details see http://www.h2database.com
|
||||
This software contains unmodified binary redistributions for H2 database
|
||||
engine (http://www.h2database.com/), which is dual licensed and available
|
||||
under the MPL 2.0 (Mozilla Public License) or under the
|
||||
EPL 1.0 (Eclipse Public License).
|
||||
An original copy of the license agreement can be found
|
||||
at: http://www.h2database.com/html/license.html
|
||||
|
||||
The binary distribution of this product bundles 'Saxon-HE' which is available
|
||||
under the MPL 2.0 license http://www.mozilla.org/MPL/2.0/
|
||||
For details see http://saxonica.com/download/opensource.xml
|
||||
|
||||
The binary distribution of this product bundles 'AspectJ Weaver' which is
|
||||
available under the EPL 1.0 license http://www.eclipse.org/legal/epl-v10.html
|
||||
For details see http://www.aspectj.org
|
||||
|
||||
The binary distribution of this product bundles 'Logback' which is available
|
||||
under the EPL 1.0 license http://www.eclipse.org/legal/epl-v10.html
|
||||
For details see http://logback.qos.ch
|
||||
Copyright (C) 1999-2012, QOS.ch. All rights reserved.
|
||||
|
||||
The binary distribution of this product bundles 'XZ for Java' which is available
|
||||
in the 'public domain'. For details see http://tukaani.org/xz/java.html
|
||||
|
||||
The binary distribution of this product bundles 'AOP Alliance' which is
|
||||
available in the 'public domain'.
|
||||
For details see http://aopalliance.sourceforge.net
|
||||
|
||||
This product bundles 'json2.js' which is available in the 'public domain'.
|
||||
For details see https://github.com/douglascrockford/JSON-js
|
||||
|
||||
|
|
7
NOTICE
7
NOTICE
|
@ -4,4 +4,11 @@ Copyright 2014 The Apache Software Foundation
|
|||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
||||
Please note that this product bundles software libraries which are covered
|
||||
by the following "weak copyleft" style licenses including;
|
||||
CDDL v1.0, CDDL v1.1, MPL v2.0, and EPL v1.0
|
||||
|
||||
Please note that this product bundles software libraries which are licensed
|
||||
to the 'public domain'.
|
||||
|
||||
Please see LICENSE for additional copyright and licensing information.
|
||||
|
|
32
README.md
32
README.md
|
@ -22,7 +22,7 @@ Apache NiFi supports powerful and scalable directed graphs of data routing, tran
|
|||
|
||||
## Getting Started
|
||||
|
||||
Execute <nifi install dir>/bin/nifi.sh
|
||||
Execute <nifi install dir>/bin/nifi.sh start
|
||||
|
||||
## Getting Help
|
||||
If you have questions, you can reach out to our mailing list: dev@nifi.incubator.apache.org
|
||||
|
@ -63,3 +63,33 @@ have stabilized in a manner consistent with other successful ASF projects.
|
|||
While incubation status is not necessarily a reflection of the completeness
|
||||
or stability of the code, it does indicate that the project has yet to be
|
||||
fully endorsed by the ASF.
|
||||
|
||||
## Export Control
|
||||
|
||||
This distribution includes cryptographic software. The country in which you
|
||||
currently reside may have restrictions on the import, possession, use, and/or
|
||||
re-export to another country, of encryption software. BEFORE using any
|
||||
encryption software, please check your country's laws, regulations and
|
||||
policies concerning the import, possession, or use, and re-export of encryption
|
||||
software, to see if this is permitted. See <http://www.wassenaar.org/> for more
|
||||
information.
|
||||
|
||||
The U.S. Government Department of Commerce, Bureau of Industry and Security
|
||||
(BIS), has classified this software as Export Commodity Control Number (ECCN)
|
||||
5D002.C.1, which includes information security software using or performing
|
||||
cryptographic functions with asymmetric algorithms. The form and manner of this
|
||||
Apache Software Foundation distribution makes it eligible for export under the
|
||||
License Exception ENC Technology Software Unrestricted (TSU) exception (see the
|
||||
BIS Export Administration Regulations, Section 740.13) for both object code and
|
||||
source code.
|
||||
|
||||
The following provides more details on the included cryptographic software:
|
||||
|
||||
Apache NiFi uses BouncyCastle, Jasypt, JCraft Inc., and the built-in
|
||||
java cryptography libraries for SSL, SSH, and the protection
|
||||
of sensitive configuration parameters. See
|
||||
http://bouncycastle.org/about.html
|
||||
http://www.jasypt.org/faq.html
|
||||
http://jcraft.com/c-info.html
|
||||
http://www.oracle.com/us/products/export/export-regulations-345813.html
|
||||
for more details on each of these libraries cryptography features.
|
||||
|
|
199
assembly/pom.xml
199
assembly/pom.xml
|
@ -43,6 +43,19 @@
|
|||
<excludeTransitive>false</excludeTransitive>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>unpack-docs</id>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/generated-docs</outputDirectory>
|
||||
<includeArtifactIds>nifi-docs</includeArtifactIds>
|
||||
<includeGroupIds>org.apache.nifi</includeGroupIds>
|
||||
<excludeTransitive>false</excludeTransitive>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -123,6 +136,13 @@
|
|||
<scope>provided</scope> <!-- Provided - we don't want the zip in the libs -->
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-docs</artifactId>
|
||||
<classifier>resources</classifier>
|
||||
<scope>provided</scope> <!-- Provided - we don't want the zip in the libs -->
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-framework-nar</artifactId>
|
||||
|
@ -325,16 +345,10 @@
|
|||
<nifi.cluster.manager.flow.retrieval.delay>5 sec</nifi.cluster.manager.flow.retrieval.delay>
|
||||
<nifi.cluster.manager.protocol.threads>10</nifi.cluster.manager.protocol.threads>
|
||||
<nifi.cluster.manager.safemode.duration>0 sec</nifi.cluster.manager.safemode.duration>
|
||||
<!--
|
||||
Properties to execute nifi using Maven. It is assumed that the assembly has a
|
||||
format of type 'dir' so that the executable can be referenced in a defined location.
|
||||
-->
|
||||
<nifi.assembly.id>bin</nifi.assembly.id>
|
||||
<nifi.executable>${project.artifactId}-${project.version}/bin/${project.artifactId}</nifi.executable>
|
||||
</properties>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>standard-rpm</id>
|
||||
<id>rpm</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
|
@ -343,101 +357,100 @@
|
|||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>rpm-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>rpm</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<name>${project.artifactId}</name>
|
||||
<projversion>${project.version}</projversion>
|
||||
<summary>Apache NiFi (incubating)</summary>
|
||||
<description>
|
||||
Apache Nifi (incubating) is dataflow system
|
||||
based on the Flow-Based Programming concepts.
|
||||
</description>
|
||||
<copyright>NONE</copyright>
|
||||
<url>http://nifi.apache.org</url>
|
||||
<description>Apache Nifi (incubating) is dataflow system based on the Flow-Based Programming concepts.</description>
|
||||
<license>Apache License, Version 2.0 and others (see included LICENSE file)</license>
|
||||
<url>http://nifi.incubator.apache.org</url>
|
||||
<group>Utilities</group>
|
||||
<requires>
|
||||
<require>jdk</require>
|
||||
</requires>
|
||||
<prefix>/opt/${project.artifactId}</prefix>
|
||||
<prefix>/opt/nifi</prefix>
|
||||
<defineStatements>
|
||||
<defineStatement>_use_internal_dependency_generator 0</defineStatement>
|
||||
</defineStatements>
|
||||
<defaultDirmode>750</defaultDirmode>
|
||||
<defaultFilemode>640</defaultFilemode>
|
||||
<defaultUsername>nifi</defaultUsername>
|
||||
<defaultGroupname>nifi</defaultGroupname>
|
||||
<mappings>
|
||||
<mapping>
|
||||
<directory>/opt/${project.artifactId}/${project.artifactId}-${project.version}</directory>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/${project.artifactId}/${project.artifactId}-${project.version}/bin</directory>
|
||||
<filemode>750</filemode>
|
||||
<sources>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/bin/nifi</location>
|
||||
<destination>${project.artifactId}</destination>
|
||||
<filter>true</filter>
|
||||
</source>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/bin/wrapper-linux-x86-32</location>
|
||||
</source>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/bin/wrapper-linux-x86-64</location>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/${project.artifactId}/${project.artifactId}-${project.version}/conf</directory>
|
||||
<configuration>true</configuration>
|
||||
<sources>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/conf</location>
|
||||
<excludes>
|
||||
<exclude>nifi.properties</exclude>
|
||||
</excludes>
|
||||
<filter>true</filter>
|
||||
</source>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/conf/nifi.properties</location>
|
||||
<destination>${project.artifactId}.properties</destination>
|
||||
<filter>true</filter>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/${project.artifactId}/${project.artifactId}-${project.version}/lib</directory>
|
||||
<dependency />
|
||||
<sources>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/lib</location>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/${project.artifactId}/${project.artifactId}-${project.version}/docs</directory>
|
||||
<sources>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/docs</location>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/${project.artifactId}/${project.artifactId}-${project.version}/logs</directory>
|
||||
<sources>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/logs</location>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
</mappings>
|
||||
<defaultUsername>root</defaultUsername>
|
||||
<defaultGroupname>root</defaultGroupname>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-bin-rpm</id>
|
||||
<goals>
|
||||
<goal>attached-rpm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<classifier>bin</classifier>
|
||||
<provides>
|
||||
<provide>nifi</provide>
|
||||
</provides>
|
||||
<mappings>
|
||||
<mapping>
|
||||
<directory>/opt/nifi/nifi-${project.version}</directory>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/nifi/nifi-${project.version}</directory>
|
||||
<sources>
|
||||
<source>
|
||||
<location>../LICENSE</location>
|
||||
</source>
|
||||
<source>
|
||||
<location>../NOTICE</location>
|
||||
</source>
|
||||
<source>
|
||||
<location>../README.md</location>
|
||||
<destination>README</destination>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/nifi/nifi-${project.version}/bin</directory>
|
||||
<filemode>750</filemode>
|
||||
<sources>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/bin/nifi.sh</location>
|
||||
<destination>nifi.sh</destination>
|
||||
<filter>true</filter>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/nifi/nifi-${project.version}/conf</directory>
|
||||
<configuration>true</configuration>
|
||||
<sources>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-resources/conf</location>
|
||||
<filter>true</filter>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/nifi/nifi-${project.version}/lib</directory>
|
||||
<dependency>
|
||||
<excludes>
|
||||
<exclude>org.apache.nifi:nifi-bootstrap</exclude>
|
||||
</excludes>
|
||||
</dependency>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/nifi/nifi-${project.version}/lib/bootstrap</directory>
|
||||
<dependency>
|
||||
<includes>
|
||||
<include>org.apache.nifi:nifi-bootstrap</include>
|
||||
</includes>
|
||||
</dependency>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<directory>/opt/nifi/nifi-${project.version}/docs</directory>
|
||||
<sources>
|
||||
<source>
|
||||
<location>${project.build.directory}/generated-docs</location>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
</mappings>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
|
|
@ -81,6 +81,13 @@
|
|||
<fileMode>0640</fileMode>
|
||||
<filtered>false</filtered>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/generated-docs/</directory>
|
||||
<outputDirectory>docs</outputDirectory>
|
||||
<directoryMode>0750</directoryMode>
|
||||
<fileMode>0640</fileMode>
|
||||
<filtered>false</filtered>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
|
||||
<files>
|
||||
|
@ -99,38 +106,31 @@
|
|||
<filtered>true</filtered>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/generated-resources/docs/README.md</source>
|
||||
<outputDirectory>docs</outputDirectory>
|
||||
<destName>README.md</destName>
|
||||
<fileMode>0640</fileMode>
|
||||
<source>../README.md</source>
|
||||
<outputDirectory>./</outputDirectory>
|
||||
<destName>README</destName>
|
||||
<fileMode>0644</fileMode>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/generated-resources/DISCLAIMER</source>
|
||||
<source>../DISCLAIMER</source>
|
||||
<outputDirectory>./</outputDirectory>
|
||||
<destName>DISCLAIMER</destName>
|
||||
<fileMode>0640</fileMode>
|
||||
<fileMode>0644</fileMode>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/generated-resources/DISCLAIMER</source>
|
||||
<outputDirectory>./</outputDirectory>
|
||||
<destName>DISCLAIMER</destName>
|
||||
<fileMode>0640</fileMode>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/generated-resources/LICENSE</source>
|
||||
<source>../LICENSE</source>
|
||||
<outputDirectory>./</outputDirectory>
|
||||
<destName>LICENSE</destName>
|
||||
<fileMode>0640</fileMode>
|
||||
<fileMode>0644</fileMode>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/generated-resources/NOTICE</source>
|
||||
<source>../NOTICE</source>
|
||||
<outputDirectory>./</outputDirectory>
|
||||
<destName>NOTICE</destName>
|
||||
<fileMode>0640</fileMode>
|
||||
<fileMode>0644</fileMode>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
</files>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-commons-parent</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>nifi-core-flowfile-attributes</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>NiFi: Core FlowFile Attributes</name>
|
||||
</project>
|
|
@ -34,7 +34,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-core-flowfile-attributes</artifactId>
|
||||
<artifactId>nifi-utils</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-commons-parent</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>naive-search-ring-buffer</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>NiFi Ring Buffer</name>
|
||||
|
||||
</project>
|
|
@ -1,35 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-commons-parent</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>nifi-file-utils</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>NiFi File Utils</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -374,20 +374,18 @@ public class NiFiProperties extends Properties {
|
|||
return getPropertyAsPort(REMOTE_INPUT_PORT, DEFAULT_REMOTE_INPUT_PORT);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return False if property value is 'false'; True otherwise.
|
||||
*/
|
||||
public Boolean isSiteToSiteSecure() {
|
||||
final String secureVal = getProperty(SITE_TO_SITE_SECURE);
|
||||
if (secureVal == null) {
|
||||
return null;
|
||||
}
|
||||
final String secureVal = getProperty(SITE_TO_SITE_SECURE, "true");
|
||||
|
||||
if ("true".equalsIgnoreCase(secureVal)) {
|
||||
return true;
|
||||
}
|
||||
if ("false".equalsIgnoreCase(secureVal)) {
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Property value for " + SITE_TO_SITE_SECURE + " is " + secureVal + "; expected 'true' or 'false'");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/target
|
|
@ -26,4 +26,8 @@
|
|||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>NiFi Utils</name>
|
||||
<!--
|
||||
This project intentionally has no additional dependencies beyond that pulled in by the parent. It is a general purpose utility library
|
||||
and should keep its surface/tension minimal.
|
||||
-->
|
||||
</project>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.FilterOutputStream;
|
||||
import java.io.IOException;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.DataOutput;
|
||||
import java.io.FilterOutputStream;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.FilterInputStream;
|
||||
import java.io.IOException;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.FilterOutputStream;
|
||||
import java.io.IOException;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
|
@ -23,8 +23,8 @@ import java.io.OutputStream;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.nifi.io.exception.BytePatternNotFoundException;
|
||||
import org.apache.nifi.io.util.NonThreadSafeCircularBuffer;
|
||||
import org.apache.nifi.stream.io.exception.BytePatternNotFoundException;
|
||||
import org.apache.nifi.stream.io.util.NonThreadSafeCircularBuffer;
|
||||
|
||||
public class StreamUtils {
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io.exception;
|
||||
package org.apache.nifi.stream.io.exception;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io.util;
|
||||
package org.apache.nifi.stream.io.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.file;
|
||||
package org.apache.nifi.util.file;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.Closeable;
|
||||
|
@ -30,11 +30,12 @@ import java.nio.channels.FileChannel;
|
|||
import java.nio.channels.FileLock;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
|
||||
|
@ -99,7 +100,7 @@ public class FileUtils {
|
|||
*
|
||||
* @param file
|
||||
* @param logger
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public static boolean deleteFile(final File file, final Logger logger) {
|
||||
return FileUtils.deleteFile(file, logger, 1);
|
||||
|
@ -116,7 +117,7 @@ public class FileUtils {
|
|||
* @return true if given file no longer exists
|
||||
*/
|
||||
public static boolean deleteFile(final File file, final Logger logger, final int attempts) {
|
||||
if(file == null){
|
||||
if (file == null) {
|
||||
return false;
|
||||
}
|
||||
boolean isGone = false;
|
||||
|
@ -601,12 +602,22 @@ public class FileUtils {
|
|||
* @throws IOException if the MD5 hash could not be computed
|
||||
*/
|
||||
public static byte[] computeMd5Digest(final File file) throws IOException {
|
||||
BufferedInputStream bis = null;
|
||||
final MessageDigest digest;
|
||||
try {
|
||||
bis = new BufferedInputStream(new FileInputStream(file));
|
||||
return DigestUtils.md5(bis);
|
||||
} finally {
|
||||
FileUtils.closeQuietly(bis);
|
||||
digest = MessageDigest.getInstance("MD5");
|
||||
} catch (final NoSuchAlgorithmException nsae) {
|
||||
throw new IOException(nsae);
|
||||
}
|
||||
|
||||
try (final FileInputStream fis = new FileInputStream(file)) {
|
||||
int len;
|
||||
final byte[] buffer = new byte[8192];
|
||||
while ((len = fis.read(buffer)) > -1) {
|
||||
if (len > 0) {
|
||||
digest.update(buffer, 0, len);
|
||||
}
|
||||
}
|
||||
}
|
||||
return digest.digest();
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.util.file.monitor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.util.file.monitor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.util.file.monitor;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -37,8 +37,10 @@ public class MD5SumMonitor implements UpdateMonitor {
|
|||
try (final FileInputStream fis = new FileInputStream(path.toFile())) {
|
||||
int len;
|
||||
final byte[] buffer = new byte[8192];
|
||||
while ((len = fis.read(buffer)) > 0) {
|
||||
digest.update(buffer, 0, len);
|
||||
while ((len = fis.read(buffer)) > -1) {
|
||||
if (len > 0) {
|
||||
digest.update(buffer, 0, len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.util.file.monitor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.util.file.monitor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
|
@ -14,8 +14,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.io;
|
||||
package org.apache.nifi.stream.io;
|
||||
|
||||
import org.apache.nifi.stream.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.stream.io.ByteArrayOutputStream;
|
||||
import org.apache.nifi.stream.io.LeakyBucketStreamThrottler;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.util.timebuffer;
|
||||
package org.apache.nifi.util.file.monitor;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
|
@ -27,10 +27,6 @@ import java.io.OutputStream;
|
|||
import java.nio.file.Path;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.nifi.io.CompoundUpdateMonitor;
|
||||
import org.apache.nifi.io.LastModifiedMonitor;
|
||||
import org.apache.nifi.io.MD5SumMonitor;
|
||||
import org.apache.nifi.io.UpdateMonitor;
|
||||
|
||||
import org.junit.Test;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.util.timebuffer;
|
||||
package org.apache.nifi.util.file.monitor;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
@ -30,9 +30,6 @@ import java.nio.file.StandardCopyOption;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.apache.nifi.io.MD5SumMonitor;
|
||||
import org.apache.nifi.io.SynchronousFileWatcher;
|
||||
import org.apache.nifi.io.UpdateMonitor;
|
||||
|
||||
public class TestSynchronousFileWatcher {
|
||||
|
|
@ -24,25 +24,9 @@
|
|||
<!-- valid logging levels: TRACE, DEBUG, INFO, WARN, ERROR -->
|
||||
<logger name="org.apache.nifi" level="DEBUG"/>
|
||||
|
||||
<!-- Logger for managing logging statements for nifi clusters. -->
|
||||
<logger name="org.apache.nifi.cluster" level="INFO"/>
|
||||
|
||||
<!--
|
||||
Logger for logging HTTP requests received by the web server. Setting
|
||||
log level to 'debug' activates HTTP request logging.
|
||||
-->
|
||||
<logger name="org.apache.nifi.server.JettyServer" level="INFO"/>
|
||||
|
||||
<!-- Logger for managing logging statements for jetty -->
|
||||
<logger name="org.mortbay" level="INFO"/>
|
||||
|
||||
<!-- Suppress non-error messages due to excessive logging by class -->
|
||||
<logger name="com.sun.jersey.spi.container.servlet.WebComponent" level="ERROR"/>
|
||||
|
||||
<logger name="org.apache.nifi.processors.standard" level="DEBUG"/>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
|
|
@ -29,22 +29,16 @@
|
|||
<name>NiFi :: Commons Parent</name>
|
||||
|
||||
<modules>
|
||||
<module>core-flowfile-attributes</module>
|
||||
<module>data-provenance-utils</module>
|
||||
<module>flowfile-packager</module>
|
||||
<module>naive-search-ring-buffer</module>
|
||||
<module>nifi-expression-language</module>
|
||||
<module>nifi-file-utils</module>
|
||||
<module>nifi-logging-utils</module>
|
||||
<module>nifi-properties</module>
|
||||
<module>nifi-security-utils</module>
|
||||
<module>nifi-socket-utils</module>
|
||||
<module>nifi-stream-utils</module>
|
||||
<module>nifi-utils</module>
|
||||
<module>nifi-web-utils</module>
|
||||
<module>processor-utilities</module>
|
||||
<module>remote-communications-utils</module>
|
||||
<module>search-utils</module>
|
||||
<module>wali</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-commons-parent</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>remote-communications-utils</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>remote-communications-utils</name>
|
||||
</project>
|
|
@ -1,30 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-commons-parent</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>nifi-search-utils</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>search-utils</name>
|
||||
|
||||
</project>
|
|
@ -35,7 +35,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-stream-utils</artifactId>
|
||||
<artifactId>nifi-utils</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -58,8 +58,8 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.nifi.io.BufferedInputStream;
|
||||
import org.apache.nifi.io.BufferedOutputStream;
|
||||
import org.apache.nifi.stream.io.BufferedInputStream;
|
||||
import org.apache.nifi.stream.io.BufferedOutputStream;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
|
@ -17,8 +17,11 @@
|
|||
package org.apache.nifi.admin.service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.apache.nifi.authorization.Authority;
|
||||
import org.apache.nifi.authorization.DownloadAuthorization;
|
||||
import org.apache.nifi.user.NiFiUser;
|
||||
import org.apache.nifi.user.NiFiUserGroup;
|
||||
|
||||
|
@ -43,6 +46,16 @@ public interface UserService {
|
|||
*/
|
||||
Boolean hasPendingUserAccount();
|
||||
|
||||
/**
|
||||
* Determines if the users in the dnChain are authorized to download content
|
||||
* with the specified attributes.
|
||||
*
|
||||
* @param dnChain
|
||||
* @param attributes
|
||||
* @return
|
||||
*/
|
||||
DownloadAuthorization authorizeDownload(List<String> dnChain, Map<String, String> attributes);
|
||||
|
||||
/**
|
||||
* Updates a user group using the specified group comprised of the specified
|
||||
* users. Returns all the users that are currently in the specified group.
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* 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.admin.service.action;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.nifi.admin.dao.DAOFactory;
|
||||
import org.apache.nifi.admin.service.AccountNotFoundException;
|
||||
import org.apache.nifi.admin.service.AdministrationException;
|
||||
import org.apache.nifi.authorization.AuthorityProvider;
|
||||
import org.apache.nifi.authorization.DownloadAuthorization;
|
||||
import org.apache.nifi.authorization.exception.AuthorityAccessException;
|
||||
import org.apache.nifi.authorization.exception.UnknownIdentityException;
|
||||
|
||||
/**
|
||||
* Attempts to obtain authorization to download the content with the specified
|
||||
* attributes for the specified user.
|
||||
*/
|
||||
public class AuthorizeDownloadAction implements AdministrationAction<DownloadAuthorization> {
|
||||
|
||||
private final List<String> dnChain;
|
||||
private final Map<String, String> attributes;
|
||||
|
||||
public AuthorizeDownloadAction(List<String> dnChain, Map<String, String> attributes) {
|
||||
this.dnChain = dnChain;
|
||||
this.attributes = attributes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DownloadAuthorization execute(DAOFactory daoFactory, AuthorityProvider authorityProvider) {
|
||||
try {
|
||||
return authorityProvider.authorizeDownload(dnChain, attributes);
|
||||
} catch (UnknownIdentityException uie) {
|
||||
throw new AccountNotFoundException(uie.getMessage(), uie);
|
||||
} catch (AuthorityAccessException aae) {
|
||||
throw new AdministrationException(aae.getMessage(), aae);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -18,6 +18,8 @@ package org.apache.nifi.admin.service.impl;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
@ -27,6 +29,7 @@ import org.apache.nifi.admin.service.AccountDisabledException;
|
|||
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.admin.service.action.AuthorizeDownloadAction;
|
||||
import org.apache.nifi.admin.service.action.AuthorizeUserAction;
|
||||
import org.apache.nifi.admin.service.action.DeleteUserAction;
|
||||
import org.apache.nifi.admin.service.action.DisableUserAction;
|
||||
|
@ -48,6 +51,7 @@ import org.apache.nifi.admin.service.transaction.Transaction;
|
|||
import org.apache.nifi.admin.service.transaction.TransactionBuilder;
|
||||
import org.apache.nifi.admin.service.transaction.TransactionException;
|
||||
import org.apache.nifi.authorization.Authority;
|
||||
import org.apache.nifi.authorization.DownloadAuthorization;
|
||||
import org.apache.nifi.user.NiFiUser;
|
||||
import org.apache.nifi.user.NiFiUserGroup;
|
||||
import org.apache.nifi.util.FormatUtils;
|
||||
|
@ -440,7 +444,7 @@ public class StandardUserService implements UserService {
|
|||
* modifying a user account. This method should only be invoked from within
|
||||
* a write lock.
|
||||
*
|
||||
* @param id
|
||||
* @param group
|
||||
*/
|
||||
@Override
|
||||
public void invalidateUserGroupAccount(String group) {
|
||||
|
@ -500,6 +504,36 @@ public class StandardUserService implements UserService {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DownloadAuthorization authorizeDownload(final List<String> dnChain, final Map<String, String> attributes) {
|
||||
Transaction transaction = null;
|
||||
|
||||
readLock.lock();
|
||||
try {
|
||||
// start the transaction
|
||||
transaction = transactionBuilder.start();
|
||||
|
||||
// authorize the download
|
||||
AuthorizeDownloadAction authorizeDownload = new AuthorizeDownloadAction(dnChain, attributes);
|
||||
DownloadAuthorization downloadAuthorization = transaction.execute(authorizeDownload);
|
||||
|
||||
// commit the transaction
|
||||
transaction.commit();
|
||||
|
||||
// return the authorization
|
||||
return downloadAuthorization;
|
||||
} catch (TransactionException | DataAccessException te) {
|
||||
rollback(transaction);
|
||||
throw new AdministrationException(te);
|
||||
} catch (Throwable t) {
|
||||
rollback(transaction);
|
||||
throw t;
|
||||
} finally {
|
||||
closeQuietly(transaction);
|
||||
readLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<NiFiUser> getUsers() {
|
||||
Transaction transaction = null;
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.lang.reflect.Method;
|
|||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.xml.XMLConstants;
|
||||
|
@ -365,6 +366,11 @@ public class AuthorityProviderFactoryBean implements FactoryBean, ApplicationCon
|
|||
public void ungroup(String group) throws AuthorityAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public DownloadAuthorization authorizeDownload(List<String> dnChain, Map<String, String> attributes) throws UnknownIdentityException, AuthorityAccessException {
|
||||
return DownloadAuthorization.approved();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize(AuthorityProviderInitializationContext initializationContext) throws ProviderCreationException {
|
||||
}
|
||||
|
@ -465,6 +471,13 @@ public class AuthorityProviderFactoryBean implements FactoryBean, ApplicationCon
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DownloadAuthorization authorizeDownload(List<String> dnChain, Map<String, String> attributes) throws UnknownIdentityException, AuthorityAccessException {
|
||||
try (final NarCloseable narCloseable = NarCloseable.withNarLoader()) {
|
||||
return baseProvider.authorizeDownload(dnChain, attributes);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize(AuthorityProviderInitializationContext initializationContext) throws ProviderCreationException {
|
||||
try (final NarCloseable narCloseable = NarCloseable.withNarLoader()) {
|
||||
|
|
|
@ -43,6 +43,8 @@ public class NiFiUser implements Serializable {
|
|||
|
||||
private AccountStatus status;
|
||||
private EnumSet<Authority> authorities;
|
||||
|
||||
private NiFiUser chain;
|
||||
|
||||
/* getters / setters */
|
||||
public Date getCreation() {
|
||||
|
@ -117,6 +119,14 @@ public class NiFiUser implements Serializable {
|
|||
this.lastAccessed = lastAccessed;
|
||||
}
|
||||
|
||||
public NiFiUser getChain() {
|
||||
return chain;
|
||||
}
|
||||
|
||||
public void setChain(NiFiUser chain) {
|
||||
this.chain = chain;
|
||||
}
|
||||
|
||||
public Set<Authority> getAuthorities() {
|
||||
if (authorities == null) {
|
||||
authorities = EnumSet.noneOf(Authority.class);
|
||||
|
|
|
@ -1,284 +0,0 @@
|
|||
/*
|
||||
* 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.admin.service.impl;
|
||||
|
||||
import org.junit.Ignore;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Ignore
|
||||
public class NiFiAuthorizationServiceTest {
|
||||
|
||||
// private static final String UNKNOWN_USER_IN_CACHE_DN = "unknown-user-in-cache-dn";
|
||||
// private static final String PENDING_USER_DN = "pending-user-dn";
|
||||
// private static final String DISABLED_USER_DN = "disabled-user-dn";
|
||||
// private static final String UNKNOWN_USER_IN_IDENTITY_PROVIDER_DN = "unknown-user-in-identity-provider-dn";
|
||||
// private static final String ACCESS_EXCEPTION_IN_IDENTITY_PROVIDER_DN = "access-exception-in-identity-provider-dn";
|
||||
// private static final String UNABLE_TO_UPDATE_CACHE_DN = "unable-to-update-cache-dn";
|
||||
// private static final String VERIFICATION_REQUIRED_DN = "verification-required-dn";
|
||||
// private static final String VERIFICATION_NOT_REQUIRED_DN = "verification-not-required-dn";
|
||||
// private static final String NEW_USER_DN = "new-user-dn";
|
||||
//
|
||||
// private UserService userService;
|
||||
// private AuthorityProvider authorityProvider;
|
||||
// private UserDAO userDAO;
|
||||
//
|
||||
// @Before
|
||||
// public void setup() throws Exception {
|
||||
// // mock the web security properties
|
||||
// NiFiProperties properties = Mockito.mock(NiFiProperties.class);
|
||||
// Mockito.when(properties.getSupportNewAccountRequests()).thenReturn(Boolean.TRUE);
|
||||
// Mockito.when(properties.getUserCredentialCacheDurationSeconds()).thenReturn(60);
|
||||
//
|
||||
// // mock the authority provider
|
||||
//
|
||||
// // mock the admin service
|
||||
// userDAO = Mockito.mock(UserDAO.class);
|
||||
// Mockito.doAnswer(new Answer() {
|
||||
//
|
||||
// @Override
|
||||
// public Object answer(InvocationOnMock invocation) throws Throwable {
|
||||
// Object[] args = invocation.getArguments();
|
||||
// String dn = (String) args[0];
|
||||
//
|
||||
// NiFiUser user = null;
|
||||
// switch (dn) {
|
||||
// case PENDING_USER_DN:
|
||||
// user = new NiFiUser();
|
||||
// user.setDn(dn);
|
||||
// user.setStatus(AccountStatus.PENDING);
|
||||
// break;
|
||||
// case DISABLED_USER_DN:
|
||||
// user = new NiFiUser();
|
||||
// user.setDn(dn);
|
||||
// user.setStatus(AccountStatus.DISABLED);
|
||||
// break;
|
||||
// case UNKNOWN_USER_IN_IDENTITY_PROVIDER_DN:
|
||||
// case UNABLE_TO_UPDATE_CACHE_DN:
|
||||
// case ACCESS_EXCEPTION_IN_IDENTITY_PROVIDER_DN:
|
||||
// user = new NiFiUser();
|
||||
// user.setDn(dn);
|
||||
// user.setStatus(AccountStatus.ACTIVE);
|
||||
// break;
|
||||
// case VERIFICATION_REQUIRED_DN: {
|
||||
// Calendar calendar = Calendar.getInstance();
|
||||
// calendar.add(Calendar.SECOND, -65);
|
||||
// user = new NiFiUser();
|
||||
// user.setDn(dn);
|
||||
// user.setStatus(AccountStatus.ACTIVE);
|
||||
// user.setLastVerified(calendar.getTime());
|
||||
// user.getAuthorities().addAll(EnumSet.of(Authority.ROLE_ADMIN, Authority.ROLE_DFM));
|
||||
// break;
|
||||
// }
|
||||
// case VERIFICATION_NOT_REQUIRED_DN: {
|
||||
// Calendar calendar = Calendar.getInstance();
|
||||
// calendar.add(Calendar.SECOND, -5);
|
||||
// user = new NiFiUser();
|
||||
// user.setDn(dn);
|
||||
// user.setStatus(AccountStatus.ACTIVE);
|
||||
// user.setLastVerified(calendar.getTime());
|
||||
// user.getAuthorities().addAll(EnumSet.of(Authority.ROLE_ADMIN, Authority.ROLE_DFM));
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// return user;
|
||||
// }
|
||||
// }).when(userDAO).getUser(Mockito.anyString());
|
||||
// Mockito.doAnswer(new Answer() {
|
||||
//
|
||||
// @Override
|
||||
// public Object answer(InvocationOnMock invocation) throws Throwable {
|
||||
// Object[] args = invocation.getArguments();
|
||||
// NiFiUser user = (NiFiUser) args[0];
|
||||
//
|
||||
// if (UNABLE_TO_UPDATE_CACHE_DN.equals(user.getDn())) {
|
||||
// throw new AdministrationException();
|
||||
// }
|
||||
// return user;
|
||||
// }
|
||||
// }).when(userDAO).updateUser(Mockito.any(NiFiUser.class));
|
||||
// Mockito.doNothing().when(userDAO).createUser(Mockito.any(NiFiUser.class));
|
||||
//
|
||||
// // mock the authority provider
|
||||
// authorityProvider = Mockito.mock(AuthorityProvider.class);
|
||||
// Mockito.doAnswer(new Answer() {
|
||||
//
|
||||
// @Override
|
||||
// public Object answer(InvocationOnMock invocation) throws Throwable {
|
||||
// Object[] args = invocation.getArguments();
|
||||
// String dn = (String) args[0];
|
||||
//
|
||||
// boolean hasDn = false;
|
||||
// if (VERIFICATION_REQUIRED_DN.equals(dn) || NEW_USER_DN.equals(dn)) {
|
||||
// hasDn = true;
|
||||
// }
|
||||
// return hasDn;
|
||||
// }
|
||||
// }).when(authorityProvider).doesDnExist(Mockito.anyString());
|
||||
// Mockito.doAnswer(new Answer() {
|
||||
//
|
||||
// @Override
|
||||
// public Object answer(InvocationOnMock invocation) throws Throwable {
|
||||
// Object[] args = invocation.getArguments();
|
||||
// String dn = (String) args[0];
|
||||
//
|
||||
// Set<String> authorities = null;
|
||||
// switch (dn) {
|
||||
// case VERIFICATION_REQUIRED_DN:
|
||||
// case NEW_USER_DN:
|
||||
// authorities = new HashSet<>();
|
||||
// authorities.add("ROLE_MONITOR");
|
||||
// break;
|
||||
// case DISABLED_USER_DN:
|
||||
// throw new UnknownIdentityException("Unable to find user");
|
||||
// }
|
||||
// return authorities;
|
||||
// }
|
||||
// }).when(authorityProvider).getAuthorities(Mockito.anyString());
|
||||
//
|
||||
// // create an instance of the authorization service
|
||||
// userService = new UserServiceImpl();
|
||||
// ((UserServiceImpl) userService).setAuthorityProvider(authorityProvider);
|
||||
// ((UserServiceImpl) userService).set(authorityProvider);
|
||||
//
|
||||
//// authorizationService.setIdentityProvider(identityProvider);
|
||||
//// authorizationService.setAuthorityProvider(authorityProvider);
|
||||
//// authorizationService.setProperties(properties);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Ensures the authorization service correctly handles users who are
|
||||
// * unknown.
|
||||
// *
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @Test(expected = org.springframework.security.core.userdetails.UsernameNotFoundException.class)
|
||||
// public void testUnknownUserInCache() throws Exception {
|
||||
// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(UNKNOWN_USER_IN_CACHE_DN));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Ensures the authorization service correctly handles users whose accounts
|
||||
// * are PENDING.
|
||||
// *
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @Test(expected = nifi.admin.service.AccountPendingException.class)
|
||||
// public void testPendingUser() throws Exception {
|
||||
// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(PENDING_USER_DN));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Ensures the authorization service correctly handles users whose accounts
|
||||
// * are DISABLED.
|
||||
// *
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @Test(expected = org.springframework.security.authentication.DisabledException.class)
|
||||
// public void testDisabledUser() throws Exception {
|
||||
// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(DISABLED_USER_DN));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Ensures the authorization service correctly handles users whose are in
|
||||
// * the cache but have been removed from the identity provider.
|
||||
// *
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @Test(expected = org.springframework.security.authentication.DisabledException.class)
|
||||
// public void testUnknownUserInIdentityProvider() throws Exception {
|
||||
// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(UNKNOWN_USER_IN_IDENTITY_PROVIDER_DN));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Ensures the authorization service correctly handles cases when the cache
|
||||
// * is unable to be updated.
|
||||
// *
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @Test(expected = org.springframework.security.authentication.AuthenticationServiceException.class)
|
||||
// public void testUnableToUpdateCache() throws Exception {
|
||||
// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(UNABLE_TO_UPDATE_CACHE_DN));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Ensures the authorization service correctly handles cases when the
|
||||
// * identity provider has an access exception.
|
||||
// *
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @Test(expected = org.springframework.security.authentication.AuthenticationServiceException.class)
|
||||
// public void testUnableToAccessIdentity() throws Exception {
|
||||
// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(ACCESS_EXCEPTION_IN_IDENTITY_PROVIDER_DN));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Ensures that user authorities are properly loaded from the authority
|
||||
// * provider.
|
||||
// *
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @Test
|
||||
// public void testVerificationRequiredUser() throws Exception {
|
||||
// NiFiUserDetails userDetails = (NiFiUserDetails) authorizationService.loadUserByUsername(WebUtils.formatProxyDn(VERIFICATION_REQUIRED_DN));
|
||||
// NiFiUser user = userDetails.getNiFiUser();
|
||||
// Mockito.verify(authorityProvider).getAuthorities(VERIFICATION_REQUIRED_DN);
|
||||
//
|
||||
// // ensure the user details
|
||||
// Assert.assertEquals(VERIFICATION_REQUIRED_DN, user.getDn());
|
||||
// Assert.assertEquals(1, user.getAuthorities().size());
|
||||
// Assert.assertTrue(user.getAuthorities().contains(Authority.ROLE_MONITOR));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Ensures that user authorities are not loaded when the cache is still
|
||||
// * valid.
|
||||
// *
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @Test
|
||||
// public void testVerificationNotRequiredUser() throws Exception {
|
||||
// NiFiUserDetails userDetails = (NiFiUserDetails) authorizationService.loadUserByUsername(WebUtils.formatProxyDn(VERIFICATION_NOT_REQUIRED_DN));
|
||||
// NiFiUser user = userDetails.getNiFiUser();
|
||||
// Mockito.verify(authorityProvider, Mockito.never()).getAuthorities(VERIFICATION_NOT_REQUIRED_DN);
|
||||
//
|
||||
// // ensure the user details
|
||||
// Assert.assertEquals(VERIFICATION_NOT_REQUIRED_DN, user.getDn());
|
||||
// Assert.assertEquals(2, user.getAuthorities().size());
|
||||
// Assert.assertTrue(user.getAuthorities().contains(Authority.ROLE_ADMIN));
|
||||
// Assert.assertTrue(user.getAuthorities().contains(Authority.ROLE_DFM));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Ensures that new users are automatically created when the authority
|
||||
// * provider has their authorities.
|
||||
// *
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @Test
|
||||
// public void testNewUser() throws Exception {
|
||||
// NiFiUserDetails userDetails = (NiFiUserDetails) authorizationService.loadUserByUsername(WebUtils.formatProxyDn(NEW_USER_DN));
|
||||
// NiFiUser user = userDetails.getNiFiUser();
|
||||
// Mockito.verify(authorityProvider).getAuthorities(NEW_USER_DN);
|
||||
//
|
||||
// // ensure the user details
|
||||
// Assert.assertEquals(NEW_USER_DN, user.getDn());
|
||||
// Assert.assertEquals(1, user.getAuthorities().size());
|
||||
// Assert.assertTrue(user.getAuthorities().contains(Authority.ROLE_MONITOR));
|
||||
// }
|
||||
}
|
|
@ -35,9 +35,8 @@
|
|||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
@ -22,12 +22,15 @@ import org.apache.nifi.cluster.authorization.protocol.message.ProtocolMessage;
|
|||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.apache.nifi.authorization.Authority;
|
||||
import org.apache.nifi.authorization.AuthorityProvider;
|
||||
import org.apache.nifi.authorization.AuthorityProviderConfigurationContext;
|
||||
import org.apache.nifi.authorization.AuthorityProviderInitializationContext;
|
||||
import org.apache.nifi.authorization.DownloadAuthorization;
|
||||
import org.apache.nifi.authorization.annotation.AuthorityProviderContext;
|
||||
import org.apache.nifi.authorization.exception.AuthorityAccessException;
|
||||
import org.apache.nifi.authorization.exception.IdentityAlreadyExistsException;
|
||||
|
@ -282,6 +285,11 @@ public class NodeAuthorizationProvider implements AuthorityProvider, Application
|
|||
throw new AuthorityAccessException("Nodes are not allowed to ungroup.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public DownloadAuthorization authorizeDownload(List<String> dnChain, Map<String, String> attributes) throws UnknownIdentityException, AuthorityAccessException {
|
||||
return DownloadAuthorization.approved();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGroupForUser(String dn) throws UnknownIdentityException, AuthorityAccessException {
|
||||
// create message
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-file-utils</artifactId>
|
||||
<artifactId>nifi-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.net.UnknownHostException;
|
|||
import java.util.*;
|
||||
import org.apache.commons.net.util.SubnetUtils;
|
||||
import org.apache.nifi.cluster.firewall.ClusterNodeFirewall;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.apache.nifi.logging.NiFiLog;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
|
@ -48,11 +48,11 @@ import org.apache.nifi.cluster.protocol.DataFlow;
|
|||
import org.apache.nifi.cluster.protocol.NodeIdentifier;
|
||||
import org.apache.nifi.cluster.protocol.StandardDataFlow;
|
||||
import org.apache.nifi.cluster.protocol.jaxb.message.NodeIdentifierAdapter;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.io.BufferedInputStream;
|
||||
import org.apache.nifi.io.BufferedOutputStream;
|
||||
import org.apache.nifi.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.io.StreamUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.apache.nifi.stream.io.BufferedInputStream;
|
||||
import org.apache.nifi.stream.io.BufferedOutputStream;
|
||||
import org.apache.nifi.stream.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.stream.io.StreamUtils;
|
||||
import org.apache.nifi.logging.NiFiLog;
|
||||
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
||||
|
|
|
@ -16,10 +16,9 @@
|
|||
*/
|
||||
package org.apache.nifi.cluster.firewall.impl;
|
||||
|
||||
import org.apache.nifi.cluster.firewall.impl.FileBasedClusterNodeFirewall;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import static org.junit.Assert.*;
|
||||
|
|
|
@ -74,8 +74,8 @@ public class DataFlowManagementServiceImplTest {
|
|||
@Before
|
||||
public void setup() throws IOException {
|
||||
|
||||
primaryLocation = new File(System.getProperty("java.io.tmpdir") + "/primary");
|
||||
restoreLocation = new File(System.getProperty("java.io.tmpdir") + "/restore");
|
||||
primaryLocation = new File(System.getProperty("java.io.tmpdir") + "/primary" + this.getClass().getSimpleName());
|
||||
restoreLocation = new File(System.getProperty("java.io.tmpdir") + "/restore" + this.getClass().getSimpleName());
|
||||
|
||||
FileUtils.deleteDirectory(primaryLocation);
|
||||
FileUtils.deleteDirectory(restoreLocation);
|
||||
|
@ -114,6 +114,8 @@ public class DataFlowManagementServiceImplTest {
|
|||
ex.printStackTrace(System.out);
|
||||
}
|
||||
}
|
||||
FileUtils.deleteDirectory(primaryLocation);
|
||||
FileUtils.deleteDirectory(restoreLocation);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>remote-communications-utils</artifactId>
|
||||
<artifactId>nifi-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
|
@ -48,10 +48,6 @@
|
|||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
|
|
|
@ -40,10 +40,6 @@
|
|||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-file-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-properties</artifactId>
|
||||
|
@ -52,10 +48,6 @@
|
|||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>site-to-site</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-core-flowfile-attributes</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
|
|
|
@ -62,7 +62,7 @@ import org.apache.nifi.controller.repository.claim.ContentClaim;
|
|||
import org.apache.nifi.controller.repository.claim.ContentClaimManager;
|
||||
import org.apache.nifi.engine.FlowEngine;
|
||||
import org.apache.nifi.events.EventReporter;
|
||||
import org.apache.nifi.io.BufferedOutputStream;
|
||||
import org.apache.nifi.stream.io.BufferedOutputStream;
|
||||
import org.apache.nifi.processor.QueueSize;
|
||||
import org.apache.nifi.reporting.Severity;
|
||||
import org.apache.nifi.util.FormatUtils;
|
||||
|
|
|
@ -125,7 +125,7 @@ import org.apache.nifi.groups.ProcessGroup;
|
|||
import org.apache.nifi.groups.RemoteProcessGroup;
|
||||
import org.apache.nifi.groups.RemoteProcessGroupPortDescriptor;
|
||||
import org.apache.nifi.groups.StandardProcessGroup;
|
||||
import org.apache.nifi.io.StreamUtils;
|
||||
import org.apache.nifi.stream.io.StreamUtils;
|
||||
import org.apache.nifi.logging.LogLevel;
|
||||
import org.apache.nifi.logging.LogRepository;
|
||||
import org.apache.nifi.logging.LogRepositoryFactory;
|
||||
|
@ -447,10 +447,11 @@ public class FlowController implements EventAccess, ControllerServiceProvider, H
|
|||
rootGroup.setName(DEFAULT_ROOT_GROUP_NAME);
|
||||
instanceId = UUID.randomUUID().toString();
|
||||
|
||||
if (Boolean.TRUE.equals(isSiteToSiteSecure) && sslContext == null) {
|
||||
LOG.error("Unable to create Secure Site-to-Site Listener because not all required Keystore/Truststore Properties are set. Site-to-Site functionality will be disabled until this problem is has been fixed.");
|
||||
if (remoteInputSocketPort == null){
|
||||
LOG.info("Not enabling Site-to-Site functionality because nifi.remote.input.socket.port is not set");
|
||||
externalSiteListener = null;
|
||||
} else if (remoteInputSocketPort == null) {
|
||||
} else if (isSiteToSiteSecure && sslContext == null) {
|
||||
LOG.error("Unable to create Secure Site-to-Site Listener because not all required Keystore/Truststore Properties are set. Site-to-Site functionality will be disabled until this problem is has been fixed.");
|
||||
externalSiteListener = null;
|
||||
} else {
|
||||
// Register the SocketFlowFileServerProtocol as the appropriate resource for site-to-site Server Protocol
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
|
|||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.apache.nifi.encrypt.StringEncryptor;
|
||||
import org.apache.nifi.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.stream.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.web.api.dto.FlowSnippetDTO;
|
||||
import org.apache.nifi.web.api.dto.ProcessGroupDTO;
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@ import java.util.List;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import org.apache.nifi.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.io.ByteArrayOutputStream;
|
||||
import org.apache.nifi.io.DataOutputStream;
|
||||
import org.apache.nifi.io.StreamUtils;
|
||||
import org.apache.nifi.stream.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.stream.io.ByteArrayOutputStream;
|
||||
import org.apache.nifi.stream.io.DataOutputStream;
|
||||
import org.apache.nifi.stream.io.StreamUtils;
|
||||
import org.apache.nifi.persistence.StandardSnippetDeserializer;
|
||||
import org.apache.nifi.persistence.StandardSnippetSerializer;
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ import org.apache.nifi.cluster.protocol.message.ReconnectionRequestMessage;
|
|||
import org.apache.nifi.cluster.protocol.message.ReconnectionResponseMessage;
|
||||
import org.apache.nifi.engine.FlowEngine;
|
||||
import org.apache.nifi.events.BulletinFactory;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.apache.nifi.groups.ProcessGroup;
|
||||
import org.apache.nifi.lifecycle.LifeCycleStartException;
|
||||
import org.apache.nifi.logging.LogLevel;
|
||||
|
|
|
@ -52,7 +52,7 @@ import org.apache.nifi.connectable.Size;
|
|||
import org.apache.nifi.controller.exception.ProcessorInstantiationException;
|
||||
import org.apache.nifi.controller.label.Label;
|
||||
import org.apache.nifi.events.BulletinFactory;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.apache.nifi.fingerprint.FingerprintException;
|
||||
import org.apache.nifi.fingerprint.FingerprintFactory;
|
||||
import org.apache.nifi.flowfile.FlowFilePrioritizer;
|
||||
|
|
|
@ -42,10 +42,10 @@ import java.util.concurrent.locks.Lock;
|
|||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
import org.apache.nifi.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.io.ByteArrayOutputStream;
|
||||
import org.apache.nifi.io.DataOutputStream;
|
||||
import org.apache.nifi.io.StreamUtils;
|
||||
import org.apache.nifi.stream.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.stream.io.ByteArrayOutputStream;
|
||||
import org.apache.nifi.stream.io.DataOutputStream;
|
||||
import org.apache.nifi.stream.io.StreamUtils;
|
||||
import org.apache.nifi.persistence.TemplateDeserializer;
|
||||
import org.apache.nifi.persistence.TemplateSerializer;
|
||||
import org.apache.nifi.web.api.dto.ConnectableDTO;
|
||||
|
|
|
@ -65,8 +65,8 @@ import org.apache.nifi.controller.repository.claim.ContentClaim;
|
|||
import org.apache.nifi.controller.repository.claim.ContentClaimManager;
|
||||
import org.apache.nifi.controller.repository.io.SyncOnCloseOutputStream;
|
||||
import org.apache.nifi.engine.FlowEngine;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.io.StreamUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.apache.nifi.stream.io.StreamUtils;
|
||||
import org.apache.nifi.util.FormatUtils;
|
||||
import org.apache.nifi.util.LongHolder;
|
||||
import org.apache.nifi.util.NiFiProperties;
|
||||
|
|
|
@ -53,9 +53,9 @@ import org.apache.nifi.controller.repository.io.LimitedInputStream;
|
|||
import org.apache.nifi.controller.repository.io.LongHolder;
|
||||
import org.apache.nifi.flowfile.FlowFile;
|
||||
import org.apache.nifi.flowfile.attributes.CoreAttributes;
|
||||
import org.apache.nifi.io.BufferedOutputStream;
|
||||
import org.apache.nifi.io.NonCloseableInputStream;
|
||||
import org.apache.nifi.io.StreamUtils;
|
||||
import org.apache.nifi.stream.io.BufferedOutputStream;
|
||||
import org.apache.nifi.stream.io.NonCloseableInputStream;
|
||||
import org.apache.nifi.stream.io.StreamUtils;
|
||||
import org.apache.nifi.processor.DataUnit;
|
||||
import org.apache.nifi.processor.FlowFileFilter;
|
||||
import org.apache.nifi.processor.ProcessSession;
|
||||
|
|
|
@ -44,8 +44,8 @@ import org.apache.nifi.controller.repository.claim.StandardContentClaim;
|
|||
import org.apache.nifi.controller.repository.io.ArrayManagedOutputStream;
|
||||
import org.apache.nifi.controller.repository.io.MemoryManager;
|
||||
import org.apache.nifi.engine.FlowEngine;
|
||||
import org.apache.nifi.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.io.StreamUtils;
|
||||
import org.apache.nifi.stream.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.stream.io.StreamUtils;
|
||||
import org.apache.nifi.processor.DataUnit;
|
||||
import org.apache.nifi.util.NiFiProperties;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import javax.xml.parsers.ParserConfigurationException;
|
|||
import javax.xml.validation.Schema;
|
||||
import javax.xml.validation.SchemaFactory;
|
||||
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.apache.nifi.util.DomUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
|
|
@ -57,7 +57,7 @@ import org.apache.nifi.controller.reporting.StandardReportingInitializationConte
|
|||
import org.apache.nifi.controller.service.ControllerServiceLoader;
|
||||
import org.apache.nifi.controller.service.ControllerServiceNode;
|
||||
import org.apache.nifi.encrypt.StringEncryptor;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.apache.nifi.nar.NarCloseable;
|
||||
import org.apache.nifi.reporting.InitializationException;
|
||||
import org.apache.nifi.reporting.ReportingInitializationContext;
|
||||
|
|
|
@ -72,7 +72,7 @@ import org.apache.nifi.groups.ProcessGroup;
|
|||
import org.apache.nifi.groups.ProcessGroupCounts;
|
||||
import org.apache.nifi.groups.RemoteProcessGroup;
|
||||
import org.apache.nifi.groups.RemoteProcessGroupPortDescriptor;
|
||||
import org.apache.nifi.io.BufferedOutputStream;
|
||||
import org.apache.nifi.stream.io.BufferedOutputStream;
|
||||
import org.apache.nifi.remote.exception.BadRequestException;
|
||||
import org.apache.nifi.remote.exception.HandshakeException;
|
||||
import org.apache.nifi.remote.exception.PortNotRunningException;
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.List;
|
|||
import org.apache.nifi.connectable.Connection;
|
||||
import org.apache.nifi.controller.FlowFileQueue;
|
||||
import org.apache.nifi.controller.repository.claim.StandardContentClaimManager;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
|
|
@ -16,13 +16,12 @@
|
|||
*/
|
||||
package org.apache.nifi.controller.repository.io;
|
||||
|
||||
import org.apache.nifi.controller.repository.io.LimitedInputStream;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.nifi.io.ByteArrayInputStream;
|
||||
import org.apache.nifi.stream.io.ByteArrayInputStream;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<artifactId>file-authorization-provider</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>Authorization Provider: File</name>
|
||||
<name>NiFi File Authorization Provider</name>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
|
@ -62,7 +62,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-file-utils</artifactId>
|
||||
<artifactId>nifi-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
|
|
|
@ -21,6 +21,8 @@ import java.io.IOException;
|
|||
import java.util.Collection;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
|
@ -36,7 +38,7 @@ import org.apache.nifi.authorization.exception.AuthorityAccessException;
|
|||
import org.apache.nifi.authorization.exception.IdentityAlreadyExistsException;
|
||||
import org.apache.nifi.authorization.exception.ProviderCreationException;
|
||||
import org.apache.nifi.authorization.exception.UnknownIdentityException;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.apache.nifi.user.generated.ObjectFactory;
|
||||
import org.apache.nifi.user.generated.Role;
|
||||
import org.apache.nifi.user.generated.User;
|
||||
|
@ -492,6 +494,20 @@ public class FileAuthorizationProvider implements AuthorityProvider {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Grants access to download content regardless of FlowFile attributes.
|
||||
*
|
||||
* @param dnChain
|
||||
* @param attributes
|
||||
* @return
|
||||
* @throws UnknownIdentityException
|
||||
* @throws AuthorityAccessException
|
||||
*/
|
||||
@Override
|
||||
public DownloadAuthorization authorizeDownload(List<String> dnChain, Map<String, String> attributes) throws UnknownIdentityException, AuthorityAccessException {
|
||||
return DownloadAuthorization.approved();
|
||||
}
|
||||
|
||||
/**
|
||||
* Locates the user with the specified DN.
|
||||
*
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.io.File;
|
|||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import org.apache.nifi.authorization.exception.ProviderCreationException;
|
||||
import org.apache.nifi.file.FileUtils;
|
||||
import org.apache.nifi.util.file.FileUtils;
|
||||
import org.apache.nifi.util.NiFiProperties;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue