[nifi-maven] branch main updated: NIFI-11282 Fix checkstyle issues
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-maven.git The following commit(s) were added to refs/heads/main by this push: new 8a42ff1 NIFI-11282 Fix checkstyle issues new 444dcfd Merge pull request #31 from kevdoran/NIFI-11282 8a42ff1 is described below commit 8a42ff1b316afb9879bbddf28538d794a4e38927 Author: Kevin Doran AuthorDate: Mon Mar 13 18:35:48 2023 -0400 NIFI-11282 Fix checkstyle issues --- src/main/java/org/apache/nifi/NarMojo.java | 17 ++--- .../extraction/ExtensionClassLoaderFactoryTest.java | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/apache/nifi/NarMojo.java b/src/main/java/org/apache/nifi/NarMojo.java index 64a8049..f7ac09c 100644 --- a/src/main/java/org/apache/nifi/NarMojo.java +++ b/src/main/java/org/apache/nifi/NarMojo.java @@ -26,9 +26,6 @@ import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; import org.apache.maven.artifact.installer.ArtifactInstaller; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; -import org.apache.maven.artifact.repository.RepositoryRequest; -import org.apache.maven.artifact.resolver.ArtifactNotFoundException; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactResolutionRequest; import org.apache.maven.artifact.resolver.ArtifactResolutionResult; import org.apache.maven.artifact.resolver.ArtifactResolver; @@ -36,17 +33,16 @@ import org.apache.maven.artifact.resolver.DefaultArtifactResolver; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugins.dependency.utils.DependencyStatusSets; -import org.apache.maven.plugins.dependency.utils.DependencyUtil; -import org.apache.maven.plugins.dependency.utils.filters.DestFileFilter; -import org.apache.maven.plugins.dependency.utils.translators.ArtifactTranslator; -import org.apache.maven.plugins.dependency.utils.translators.ClassifierTypeTranslator; - import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; +import org.apache.maven.plugins.dependency.utils.DependencyStatusSets; +import org.apache.maven.plugins.dependency.utils.DependencyUtil; +import org.apache.maven.plugins.dependency.utils.filters.DestFileFilter; +import org.apache.maven.plugins.dependency.utils.translators.ArtifactTranslator; +import org.apache.maven.plugins.dependency.utils.translators.ClassifierTypeTranslator; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; import org.apache.maven.project.ProjectBuilder; @@ -980,8 +976,7 @@ public class NarMojo extends AbstractMojo { for (Artifact artifact : artifacts) { ArtifactResolutionRequest req = getArtifactResolutionRequest(artifact); ArtifactResolutionResult result = artifactResolver.resolve(req); -if (result.getArtifacts() != null) -{ +if (result.getArtifacts() != null) { unResolvedArtifacts.removeAll(result.getArtifacts()); } } diff --git a/src/test/java/org/apache/nifi/extension/definition/extraction/ExtensionClassLoaderFactoryTest.java b/src/test/java/org/apache/nifi/extension/definition/extraction/ExtensionClassLoaderFactoryTest.java index c6e6cf0..751ec01 100644 --- a/src/test/java/org/apache/nifi/extension/definition/extraction/ExtensionClassLoaderFactoryTest.java +++ b/src/test/java/org/apache/nifi/extension/definition/extraction/ExtensionClassLoaderFactoryTest.java @@ -124,7 +124,7 @@ class ExtensionClassLoaderFactoryTest { } verifyNoMoreInteractions(artifactResolver); } - + private List getExpectedArtifactResolutionRequests() { ArtifactResolutionRequest request1 = new ArtifactResolutionRequest(); request1.setArtifact(artifact2);
[nifi-maven] annotated tag nifi-nar-maven-plugin-1.5.0-RC1 updated (ec2635b -> 43a0363)
This is an automated email from the ASF dual-hosted git repository. kdoran pushed a change to annotated tag nifi-nar-maven-plugin-1.5.0-RC1 in repository https://gitbox.apache.org/repos/asf/nifi-maven.git *** WARNING: tag nifi-nar-maven-plugin-1.5.0-RC1 was modified! *** from ec2635b (commit) to 43a0363 (tag) tagging ec2635b0474994861d3225538168e46638c0d2bb (commit) replaces rel/nifi-nar-maven-plugin-1.4.0 by Kevin Doran on Mon Mar 13 14:29:47 2023 -0400 - Log - NIFI-11278-RC1 copy for tag nifi-nar-maven-plugin-1.5.0-RC1 --- No new revisions were added by this update. Summary of changes:
[nifi-maven] 01/02: NIFI-11278-RC1 prepare release nifi-nar-maven-plugin-1.5.0-RC1
This is an automated email from the ASF dual-hosted git repository. kdoran pushed a commit to branch NIFI-11278-RC1 in repository https://gitbox.apache.org/repos/asf/nifi-maven.git commit ec2635b0474994861d3225538168e46638c0d2bb Author: Kevin Doran AuthorDate: Mon Mar 13 14:29:39 2023 -0400 NIFI-11278-RC1 prepare release nifi-nar-maven-plugin-1.5.0-RC1 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 873330e..02eed5b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.apache.nifi nifi-nar-maven-plugin -1.5.0-SNAPSHOT +1.5.0 maven-plugin Apache NiFi Nar Maven Plugin http://nifi.apache.org @@ -67,7 +67,7 @@ scm:git:git://git.apache.org/nifi-maven.git scm:git:https://git-wip-us.apache.org/repos/asf/nifi-maven.git https://git-wip-us.apache.org/repos/asf?p=nifi-maven.git -nifi-nar-maven-plugin-1.4.0-RC1 +nifi-nar-maven-plugin-1.5.0-RC1 JIRA @@ -79,7 +79,7 @@ 3.6.3 UTF-8 UTF-8 - 2023-03-08T15:05:37Z + 2023-03-13T18:29:26Z 2014
[nifi-maven] 02/02: NIFI-11278-RC1 prepare for next development iteration
This is an automated email from the ASF dual-hosted git repository. kdoran pushed a commit to branch NIFI-11278-RC1 in repository https://gitbox.apache.org/repos/asf/nifi-maven.git commit e6b7b454999dce8f769a5840808efef2b7ca4b96 Author: Kevin Doran AuthorDate: Mon Mar 13 14:29:47 2023 -0400 NIFI-11278-RC1 prepare for next development iteration --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 02eed5b..a70548d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.apache.nifi nifi-nar-maven-plugin -1.5.0 +1.5.1-SNAPSHOT maven-plugin Apache NiFi Nar Maven Plugin http://nifi.apache.org @@ -67,7 +67,7 @@ scm:git:git://git.apache.org/nifi-maven.git scm:git:https://git-wip-us.apache.org/repos/asf/nifi-maven.git https://git-wip-us.apache.org/repos/asf?p=nifi-maven.git -nifi-nar-maven-plugin-1.5.0-RC1 +nifi-nar-maven-plugin-1.4.0-RC1 JIRA @@ -79,7 +79,7 @@ 3.6.3 UTF-8 UTF-8 - 2023-03-13T18:29:26Z + 2023-03-13T18:29:47Z 2014
[nifi-maven] branch NIFI-11278-RC1 created (now e6b7b45)
This is an automated email from the ASF dual-hosted git repository. kdoran pushed a change to branch NIFI-11278-RC1 in repository https://gitbox.apache.org/repos/asf/nifi-maven.git at e6b7b45 NIFI-11278-RC1 prepare for next development iteration This branch includes the following new commits: new ec2635b NIFI-11278-RC1 prepare release nifi-nar-maven-plugin-1.5.0-RC1 new e6b7b45 NIFI-11278-RC1 prepare for next development iteration The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[nifi] branch support/nifi-1.x updated: NIFI-11274 only add @timestamp to PutElasticsearchRecord document if not null
This is an automated email from the ASF dual-hosted git repository. kdoran pushed a commit to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/support/nifi-1.x by this push: new 63bb245a2a NIFI-11274 only add @timestamp to PutElasticsearchRecord document if not null 63bb245a2a is described below commit 63bb245a2a9512fd28677e85d49754d3754565a3 Author: Chris Sampson AuthorDate: Mon Mar 13 14:08:14 2023 + NIFI-11274 only add @timestamp to PutElasticsearchRecord document if not null This closes #7036. Signed-off-by: Kevin Doran --- .../nifi/processors/elasticsearch/PutElasticsearchRecord.java| 4 +++- .../processors/elasticsearch/PutElasticsearchRecordTest.groovy | 9 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecord.java b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecord.java index 2b682c2c24..d70a615915 100644 --- a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecord.java +++ b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecord.java @@ -373,7 +373,9 @@ public class PutElasticsearchRecord extends AbstractPutElasticsearch { final Map contentMap = (Map) DataTypeUtils .convertRecordFieldtoObject(record, RecordFieldType.RECORD.getRecordDataType(record.getSchema())); formatDateTimeFields(contentMap, record); -contentMap.putIfAbsent("@timestamp", timestamp); +if (timestamp != null) { +contentMap.putIfAbsent("@timestamp", timestamp); +} operationList.add(new IndexOperationRequest(idx, t, id, contentMap, o)); originals.add(record); diff --git a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/test/groovy/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecordTest.groovy b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/test/groovy/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecordTest.groovy index 3c0426023a..5e976a31d3 100644 --- a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/test/groovy/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecordTest.groovy +++ b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/test/groovy/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecordTest.groovy @@ -30,7 +30,6 @@ import org.apache.nifi.serialization.RecordReaderFactory import org.apache.nifi.serialization.record.MockRecordParser import org.apache.nifi.serialization.record.MockSchemaRegistry import org.apache.nifi.serialization.record.RecordFieldType -import org.apache.nifi.util.MockFlowFile import org.apache.nifi.util.StringUtils import org.apache.nifi.util.TestRunner import org.apache.nifi.util.TestRunners @@ -425,7 +424,7 @@ class PutElasticsearchRecordTest { [ id: "rec-2", op: "create", index: "bulk_b", type: "message", msg: "Hello" ], [ id: "rec-3", op: "update", index: "bulk_a", type: "message", msg: "Hello" ], [ id: "rec-4", op: "upsert", index: "bulk_b", type: "message", msg: "Hello" ], -[ id: "rec-5", op: "create", index: "bulk_a", type: "message", msg: "Hello" ], +[ id: "rec-5", op: "create", index: "bulk_a", type: "message", msg: "Hello", code: null ], [ id: "rec-6", op: "delete", index: "bulk_b", type: "message", msg: "Hello", code: 101L ] ])) @@ -436,7 +435,7 @@ class PutElasticsearchRecordTest { int upsert = items.findAll { it.operation == IndexOperationRequest.Operation.Upsert }.size() int delete = items.findAll { it.operation == IndexOperationRequest.Operation.Delete }.size() def timestampCount = items.findAll { it.fields.get("@timestamp") == 101L }.size() -def noTimestampCount = items.findAll { it.fields.get("@timestamp") == null }.size() +def noTimestampCount = items.findAll { !it.fields.containsKey("@timestamp") }.size() assertEquals(1, index) assertEquals(2, create) assertEquals(1, update) @@ -487,7 +486,7 @@ class PutElasticsearchRecordTest { clientService.evalClosure = { List items -> def nullIdCount = items.findAll { it.id == null }.size() -def noTimestampCount = items.findAll {
[nifi] branch main updated (1f34b9cd99 -> f71ba8aadb)
This is an automated email from the ASF dual-hosted git repository. kdoran pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git from 1f34b9cd99 [NIFI-11258] update nifi-registry frontend deps (#7025) add f71ba8aadb NIFI-11274 only add @timestamp to PutElasticsearchRecord document if not null No new revisions were added by this update. Summary of changes: .../nifi/processors/elasticsearch/PutElasticsearchRecord.java| 4 +++- .../processors/elasticsearch/PutElasticsearchRecordTest.groovy | 9 - 2 files changed, 7 insertions(+), 6 deletions(-)
[nifi] branch main updated (d2f80b1645 -> 1f34b9cd99)
This is an automated email from the ASF dual-hosted git repository. mtien pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git from d2f80b1645 NIFI-11260 Added STS SSL Context Service for AWS Credentials Provider add 1f34b9cd99 [NIFI-11258] update nifi-registry frontend deps (#7025) No new revisions were added by this update. Summary of changes: .../src/main/package-lock.json | 57871 ++- .../nifi-registry-web-ui/src/main/package.json |13 +- 2 files changed, 29012 insertions(+), 28872 deletions(-)
[nifi] branch support/nifi-1.x updated: NIFI-11161 Simplified KeyedCipherPropertyEncryptor
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/support/nifi-1.x by this push: new 4d537951f5 NIFI-11161 Simplified KeyedCipherPropertyEncryptor 4d537951f5 is described below commit 4d537951f50411f7311cd0d8dad354eb09b3a6a4 Author: exceptionfactory AuthorDate: Thu Feb 9 16:19:05 2023 -0600 NIFI-11161 Simplified KeyedCipherPropertyEncryptor - Replaced KeyedCipherProvider references with direct Cipher instantiation This closes #6939 Signed-off-by: Paul Grey --- .../nifi/encrypt/KeyedCipherPropertyEncryptor.java | 48 +- .../nifi/encrypt/PropertyEncryptorBuilder.java | 6 +-- .../encrypt/KeyedCipherPropertyEncryptorTest.java | 17 +++- 3 files changed, 26 insertions(+), 45 deletions(-) diff --git a/nifi-commons/nifi-property-encryptor/src/main/java/org/apache/nifi/encrypt/KeyedCipherPropertyEncryptor.java b/nifi-commons/nifi-property-encryptor/src/main/java/org/apache/nifi/encrypt/KeyedCipherPropertyEncryptor.java index 7bcd002b39..5c56fd2dd4 100644 --- a/nifi-commons/nifi-property-encryptor/src/main/java/org/apache/nifi/encrypt/KeyedCipherPropertyEncryptor.java +++ b/nifi-commons/nifi-property-encryptor/src/main/java/org/apache/nifi/encrypt/KeyedCipherPropertyEncryptor.java @@ -16,30 +16,24 @@ */ package org.apache.nifi.encrypt; -import org.apache.nifi.security.util.EncryptionMethod; -import org.apache.nifi.security.util.crypto.KeyedCipherProvider; - import javax.crypto.Cipher; import javax.crypto.SecretKey; +import javax.crypto.spec.GCMParameterSpec; import java.security.SecureRandom; import java.util.Arrays; import java.util.Objects; /** - * Property Encryptor implementation using Keyed Cipher Provider + * Property Encryptor implementation using AES-GCM */ class KeyedCipherPropertyEncryptor extends CipherPropertyEncryptor { private static final int INITIALIZATION_VECTOR_LENGTH = 16; -private static final int ARRAY_START = 0; - -private static final boolean ENCRYPT = true; +private static final int GCM_TAG_LENGTH_BITS = 128; -private static final boolean DECRYPT = false; - -private final KeyedCipherProvider cipherProvider; +private static final int ARRAY_START = 0; -private final EncryptionMethod encryptionMethod; +private static final String CIPHER_ALGORITHM = "AES/GCM/NoPadding"; private final SecretKey secretKey; @@ -47,16 +41,11 @@ class KeyedCipherPropertyEncryptor extends CipherPropertyEncryptor { private final String description; -protected KeyedCipherPropertyEncryptor(final KeyedCipherProvider cipherProvider, - final EncryptionMethod encryptionMethod, - final SecretKey secretKey) { -this.cipherProvider = cipherProvider; -this.encryptionMethod = encryptionMethod; +protected KeyedCipherPropertyEncryptor(final SecretKey secretKey) { this.secretKey = secretKey; this.secureRandom = new SecureRandom(); -this.description = String.format("%s Encryption Method [%s] Key Algorithm [%s] Key Bytes [%d]", +this.description = String.format("%s Key Algorithm [%s] Key Bytes [%d]", getClass().getSimpleName(), -encryptionMethod.getAlgorithm(), secretKey.getAlgorithm(), secretKey.getEncoded().length); } @@ -70,7 +59,7 @@ class KeyedCipherPropertyEncryptor extends CipherPropertyEncryptor { @Override protected Cipher getDecryptionCipher(final byte[] encryptedBinary) { final byte[] initializationVector = readInitializationVector(encryptedBinary); -return getCipher(initializationVector, DECRYPT); +return getCipher(initializationVector, Cipher.DECRYPT_MODE); } /** @@ -81,7 +70,7 @@ class KeyedCipherPropertyEncryptor extends CipherPropertyEncryptor { */ @Override protected Cipher getEncryptionCipher(byte[] encodedParameters) { -return getCipher(encodedParameters, ENCRYPT); +return getCipher(encodedParameters, Cipher.ENCRYPT_MODE); } /** @@ -107,11 +96,14 @@ class KeyedCipherPropertyEncryptor extends CipherPropertyEncryptor { return initializationVector; } -private Cipher getCipher(final byte[] initializationVector, final boolean encrypt) { +private Cipher getCipher(final byte[] initializationVector, final int cipherMode) { try { -return cipherProvider.getCipher(encryptionMethod, secretKey, initializationVector, encrypt); +final Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); +final GCMParameterSpec parameterSpec = new GCMParameterSpec(GCM_TAG_LENGTH_BITS, initializationVector); +
[nifi] branch support/nifi-1.x updated: NIFI-11260 Added STS SSL Context Service for AWS Credentials Provider
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/support/nifi-1.x by this push: new ae24bccfd9 NIFI-11260 Added STS SSL Context Service for AWS Credentials Provider ae24bccfd9 is described below commit ae24bccfd9dd5dd585fe6d46d656ce5b19abc1d5 Author: Peter Turcsanyi AuthorDate: Wed Mar 8 12:30:05 2023 +0100 NIFI-11260 Added STS SSL Context Service for AWS Credentials Provider This closes #7021 Signed-off-by: David Handermann --- .../factory/CredentialPropertyDescriptors.java | 10 +++ .../factory/CredentialsProviderFactory.java| 33 .../provider/factory/CredentialsStrategy.java | 15 ++-- .../AbstractBooleanCredentialsStrategy.java| 14 +++- .../strategies/AbstractCredentialsStrategy.java| 19 +++-- .../AccessKeyPairCredentialsStrategy.java | 15 ++-- .../strategies/AnonymousCredentialsStrategy.java | 8 +- .../strategies/AssumeRoleCredentialsStrategy.java | 91 -- .../ExplicitDefaultCredentialsStrategy.java| 10 +-- .../strategies/FileCredentialsStrategy.java| 10 +-- .../ImplicitDefaultCredentialsStrategy.java| 7 +- .../NamedProfileCredentialsStrategy.java | 11 ++- .../AWSCredentialsProviderControllerService.java | 25 +++--- .../factory/TestCredentialsProviderFactory.java| 55 - 14 files changed, 156 insertions(+), 167 deletions(-) diff --git a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java index 6c2fc2b8db..f693e97992 100644 --- a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java +++ b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java @@ -23,6 +23,7 @@ import org.apache.nifi.components.resource.ResourceType; import org.apache.nifi.expression.ExpressionLanguageScope; import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.processors.aws.AwsPropertyDescriptors; +import org.apache.nifi.ssl.SSLContextService; import software.amazon.awssdk.regions.Region; import java.util.ArrayList; @@ -173,6 +174,15 @@ public class CredentialPropertyDescriptors { .dependsOn(ASSUME_ROLE_ARN) .build(); +public static final PropertyDescriptor ASSUME_ROLE_SSL_CONTEXT_SERVICE = new PropertyDescriptor.Builder() +.name("assume-role-ssl-context-service") +.displayName("Assume Role SSL Context Service") +.description("SSL Context Service used when connecting to the STS Endpoint.") +.identifiesControllerService(SSLContextService.class) +.required(false) +.dependsOn(ASSUME_ROLE_ARN) +.build(); + /** * Assume Role Proxy variables for configuring proxy to retrieve keys */ diff --git a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsProviderFactory.java b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsProviderFactory.java index 545f3a283a..e1249693f2 100644 --- a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsProviderFactory.java +++ b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsProviderFactory.java @@ -19,11 +19,10 @@ package org.apache.nifi.processors.aws.credentials.provider.factory; import java.util.ArrayList; import java.util.Collection; import java.util.List; -import java.util.Map; -import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; +import org.apache.nifi.context.PropertyContext; import org.apache.nifi.processors.aws.credentials.provider.factory.strategies.ExplicitDefaultCredentialsStrategy; import org.apache.nifi.processors.aws.credentials.provider.factory.strategies.AccessKeyPairCredentialsStrategy; import org.apache.nifi.processors.aws.credentials.provider.factory.strategies.FileCredentialsStrategy; @@ -66,20 +65,15 @@ public class CredentialsProviderFactory { strategies.add(new
[nifi] branch main updated: NIFI-11260 Added STS SSL Context Service for AWS Credentials Provider
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/main by this push: new d2f80b1645 NIFI-11260 Added STS SSL Context Service for AWS Credentials Provider d2f80b1645 is described below commit d2f80b1645c6b6f611130451cd8875ee78dc3b46 Author: Peter Turcsanyi AuthorDate: Wed Mar 8 12:30:05 2023 +0100 NIFI-11260 Added STS SSL Context Service for AWS Credentials Provider This closes #7021 Signed-off-by: David Handermann --- .../factory/CredentialPropertyDescriptors.java | 10 +++ .../factory/CredentialsProviderFactory.java| 33 .../provider/factory/CredentialsStrategy.java | 15 ++-- .../AbstractBooleanCredentialsStrategy.java| 14 +++- .../strategies/AbstractCredentialsStrategy.java| 19 +++-- .../AccessKeyPairCredentialsStrategy.java | 15 ++-- .../strategies/AnonymousCredentialsStrategy.java | 8 +- .../strategies/AssumeRoleCredentialsStrategy.java | 91 -- .../ExplicitDefaultCredentialsStrategy.java| 10 +-- .../strategies/FileCredentialsStrategy.java| 10 +-- .../ImplicitDefaultCredentialsStrategy.java| 7 +- .../NamedProfileCredentialsStrategy.java | 11 ++- .../AWSCredentialsProviderControllerService.java | 25 +++--- .../factory/TestCredentialsProviderFactory.java| 55 - 14 files changed, 156 insertions(+), 167 deletions(-) diff --git a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java index 6c2fc2b8db..f693e97992 100644 --- a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java +++ b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java @@ -23,6 +23,7 @@ import org.apache.nifi.components.resource.ResourceType; import org.apache.nifi.expression.ExpressionLanguageScope; import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.processors.aws.AwsPropertyDescriptors; +import org.apache.nifi.ssl.SSLContextService; import software.amazon.awssdk.regions.Region; import java.util.ArrayList; @@ -173,6 +174,15 @@ public class CredentialPropertyDescriptors { .dependsOn(ASSUME_ROLE_ARN) .build(); +public static final PropertyDescriptor ASSUME_ROLE_SSL_CONTEXT_SERVICE = new PropertyDescriptor.Builder() +.name("assume-role-ssl-context-service") +.displayName("Assume Role SSL Context Service") +.description("SSL Context Service used when connecting to the STS Endpoint.") +.identifiesControllerService(SSLContextService.class) +.required(false) +.dependsOn(ASSUME_ROLE_ARN) +.build(); + /** * Assume Role Proxy variables for configuring proxy to retrieve keys */ diff --git a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsProviderFactory.java b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsProviderFactory.java index 545f3a283a..e1249693f2 100644 --- a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsProviderFactory.java +++ b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsProviderFactory.java @@ -19,11 +19,10 @@ package org.apache.nifi.processors.aws.credentials.provider.factory; import java.util.ArrayList; import java.util.Collection; import java.util.List; -import java.util.Map; -import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; +import org.apache.nifi.context.PropertyContext; import org.apache.nifi.processors.aws.credentials.provider.factory.strategies.ExplicitDefaultCredentialsStrategy; import org.apache.nifi.processors.aws.credentials.provider.factory.strategies.AccessKeyPairCredentialsStrategy; import org.apache.nifi.processors.aws.credentials.provider.factory.strategies.FileCredentialsStrategy; @@ -66,20 +65,15 @@ public class CredentialsProviderFactory { strategies.add(new AssumeRoleCredentialsStrategy());
[nifi] branch main updated: NIFI-11267 Removed deprecated OAuth2TokenProviderImpl
This is an automated email from the ASF dual-hosted git repository. pvillard pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/main by this push: new b23b2621ac NIFI-11267 Removed deprecated OAuth2TokenProviderImpl b23b2621ac is described below commit b23b2621acd53a96d3b8371e128fc1b5590632d0 Author: exceptionfactory AuthorDate: Fri Mar 10 09:30:40 2023 -0600 NIFI-11267 Removed deprecated OAuth2TokenProviderImpl Signed-off-by: Pierre Villard This closes #7029. --- .../nifi-oauth2-provider-service/pom.xml | 24 +-- .../nifi/oauth2/OAuth2TokenProviderImpl.java | 186 - .../org.apache.nifi.controller.ControllerService | 2 - .../nifi/oauth2/OAuth2TokenProviderImplTest.java | 125 -- 4 files changed, 4 insertions(+), 333 deletions(-) diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/pom.xml b/nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/pom.xml index 7dce8e65ac..75c5ff63fc 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/pom.xml +++ b/nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/pom.xml @@ -40,31 +40,20 @@ nifi-utils 2.0.0-SNAPSHOT - -org.apache.nifi -nifi-record -provided - - org.apache.nifi nifi-ssl-context-service-api 2.0.0-SNAPSHOT provided - - -org.apache.commons -commons-lang3 - - -org.slf4j -log4j-over-slf4j - com.squareup.okhttp3 okhttp + +com.fasterxml.jackson.core +jackson-databind + com.squareup.okhttp3 mockwebserver @@ -76,10 +65,5 @@ 2.0.0-SNAPSHOT test - -com.fasterxml.jackson.core -jackson-databind -compile - diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/OAuth2TokenProviderImpl.java b/nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/OAuth2TokenProviderImpl.java deleted file mode 100644 index cc06309c2e..00 --- a/nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/OAuth2TokenProviderImpl.java +++ /dev/null @@ -1,186 +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.oauth2; - -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import javax.net.ssl.SSLContext; -import javax.net.ssl.X509TrustManager; - -import okhttp3.FormBody; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import org.apache.nifi.annotation.documentation.CapabilityDescription; -import org.apache.nifi.annotation.documentation.DeprecationNotice; -import org.apache.nifi.annotation.documentation.Tags; -import org.apache.nifi.annotation.lifecycle.OnEnabled; -import org.apache.nifi.components.PropertyDescriptor; -import org.apache.nifi.controller.AbstractControllerService; -import org.apache.nifi.controller.ConfigurationContext; -import org.apache.nifi.processor.exception.ProcessException; -import org.apache.nifi.ssl.SSLContextService; -import org.apache.nifi.util.StringUtils; - -@Deprecated -@DeprecationNotice(alternatives = {StandardOauth2AccessTokenProvider.class}) -@Tags({"oauth2", "provider", "authorization" }) -@CapabilityDescription("This controller service provides a way of working with access and refresh tokens via the " + -"password and client_credential grant flows
[nifi] branch main updated: NIFI-11268 Removed deprecated OpenPGP support from EncryptContent
This is an automated email from the ASF dual-hosted git repository. pvillard pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/main by this push: new 665b1696ef NIFI-11268 Removed deprecated OpenPGP support from EncryptContent 665b1696ef is described below commit 665b1696efb40f5793344a0bc9da4788e17b79b8 Author: exceptionfactory AuthorDate: Fri Mar 10 10:30:15 2023 -0600 NIFI-11268 Removed deprecated OpenPGP support from EncryptContent Signed-off-by: Pierre Villard This closes #7030. --- .../nifi/encrypt/PropertyEncryptorFactoryTest.java | 2 +- .../nifi/security/util/EncryptionMethod.java | 2 - .../nifi-standard-processors/pom.xml | 4 - .../nifi/processors/standard/EncryptContent.java | 213 +-- .../nifi/processors/standard/util/PGPUtil.java | 94 - .../util/crypto/OpenPGPKeyBasedEncryptor.java | 388 - .../util/crypto/OpenPGPPasswordBasedEncryptor.java | 166 - .../additionalDetails.html | 30 -- .../processors/standard/TestEncryptContent.java| 381 +--- .../util/crypto/OpenPGPKeyBasedEncryptorTest.java | 66 .../crypto/OpenPGPPasswordBasedEncryptorTest.java | 59 .../test/resources/TestEncryptContent/pubring.gpg | Bin 1250 -> 0 bytes .../test/resources/TestEncryptContent/secring.gpg | Bin 2628 -> 0 bytes .../test/resources/TestEncryptContent/text.txt.asc | 33 -- .../test/resources/TestEncryptContent/text.txt.gpg | Bin 1481 -> 0 bytes .../TestEncryptContent/text.txt.unsigned.gpg | Bin 824 -> 0 bytes 16 files changed, 13 insertions(+), 1425 deletions(-) diff --git a/nifi-commons/nifi-property-encryptor/src/test/java/org/apache/nifi/encrypt/PropertyEncryptorFactoryTest.java b/nifi-commons/nifi-property-encryptor/src/test/java/org/apache/nifi/encrypt/PropertyEncryptorFactoryTest.java index a711cc23b7..032dd9283c 100644 --- a/nifi-commons/nifi-property-encryptor/src/test/java/org/apache/nifi/encrypt/PropertyEncryptorFactoryTest.java +++ b/nifi-commons/nifi-property-encryptor/src/test/java/org/apache/nifi/encrypt/PropertyEncryptorFactoryTest.java @@ -33,7 +33,7 @@ public class PropertyEncryptorFactoryTest { @Test public void testGetPropertyEncryptorUnsupportedEncryptionMethod() { final Properties properties = new Properties(); -properties.setProperty(NiFiProperties.SENSITIVE_PROPS_ALGORITHM, EncryptionMethod.PGP.getAlgorithm()); +properties.setProperty(NiFiProperties.SENSITIVE_PROPS_ALGORITHM, EncryptionMethod.AES_CBC_NO_PADDING.getAlgorithm()); properties.setProperty(NiFiProperties.SENSITIVE_PROPS_KEY, String.class.getName()); final NiFiProperties niFiProperties = NiFiProperties.createBasicNiFiProperties(null, properties); diff --git a/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/util/EncryptionMethod.java b/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/util/EncryptionMethod.java index 0ba3d59a03..ac481f1508 100644 --- a/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/util/EncryptionMethod.java +++ b/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/util/EncryptionMethod.java @@ -47,8 +47,6 @@ public enum EncryptionMethod { SHA_2KEYTRIPLEDES("PBEWITHSHAAND2-KEYTRIPLEDES-CBC", "BC", false, false), SHA_3KEYTRIPLEDES("PBEWITHSHAAND3-KEYTRIPLEDES-CBC", "BC", false, false), SHA_TWOFISH("PBEWITHSHAANDTWOFISH-CBC", "BC", false, false), -PGP("PGP", "BC", false, false), -PGP_ASCII_ARMOR("PGP-ASCII-ARMOR", "BC", false, false), // AES/CBC/NoPadding supported for decryption AES_CBC_NO_PADDING("AES/CBC/NoPadding", "BC", false, true), AES_CBC("AES/CBC/PKCS7Padding", "BC", false, true), diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml index 12ef990880..d77a08e91f 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml @@ -149,10 +149,6 @@ org.bouncycastle bcprov-jdk18on - -org.bouncycastle -bcpg-jdk18on - org.bouncycastle bcpkix-jdk18on diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java index 7fc901b8ff..38c5a90fd4 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java +++
[nifi] branch main updated: NIFI-11265 Removed nifi-toolkit-flowanalyzer
This is an automated email from the ASF dual-hosted git repository. pvillard pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/main by this push: new 3aecd3bda9 NIFI-11265 Removed nifi-toolkit-flowanalyzer 3aecd3bda9 is described below commit 3aecd3bda91c29f639892504fe5f54df9478c367 Author: exceptionfactory AuthorDate: Fri Mar 10 08:55:59 2023 -0600 NIFI-11265 Removed nifi-toolkit-flowanalyzer Signed-off-by: Pierre Villard This closes #7028. --- nifi-toolkit/nifi-toolkit-assembly/pom.xml | 5 - .../src/main/resources/bin/flow-analyzer.bat | 41 -- .../src/main/resources/bin/flow-analyzer.sh| 119 --- nifi-toolkit/nifi-toolkit-flowanalyzer/pom.xml | 54 --- .../toolkit/flowanalyzer/FlowAnalyzerDriver.java | 161 - .../nifi/toolkit/FlowAnalyzerDriverTest.java | 61 nifi-toolkit/pom.xml | 1 - 7 files changed, 442 deletions(-) diff --git a/nifi-toolkit/nifi-toolkit-assembly/pom.xml b/nifi-toolkit/nifi-toolkit-assembly/pom.xml index 8b858102dc..9aea7ac9e2 100644 --- a/nifi-toolkit/nifi-toolkit-assembly/pom.xml +++ b/nifi-toolkit/nifi-toolkit-assembly/pom.xml @@ -87,11 +87,6 @@ language governing permissions and limitations under the License. --> org.apache.nifi nifi-toolkit-zookeeper-migrator 2.0.0-SNAPSHOT - - -org.apache.nifi -nifi-toolkit-flowanalyzer -2.0.0-SNAPSHOT org.apache.nifi diff --git a/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/flow-analyzer.bat b/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/flow-analyzer.bat deleted file mode 100644 index 0a4d83454d..00 --- a/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/flow-analyzer.bat +++ /dev/null @@ -1,41 +0,0 @@ -@echo off -rem -remLicensed to the Apache Software Foundation (ASF) under one or more -remcontributor license agreements. See the NOTICE file distributed with -remthis work for additional information regarding copyright ownership. -remThe ASF licenses this file to You under the Apache License, Version 2.0 -rem(the "License"); you may not use this file except in compliance with -remthe License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -remUnless required by applicable law or agreed to in writing, software -remdistributed under the License is distributed on an "AS IS" BASIS, -remWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -remSee the License for the specific language governing permissions and -remlimitations under the License. -rem - -rem Use JAVA_HOME if it's set; otherwise, just use java - -if "%JAVA_HOME%" == "" goto noJavaHome -if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome -set JAVA_EXE=%JAVA_HOME%\bin\java.exe -goto startConfig - -:noJavaHome -echo The JAVA_HOME environment variable is not defined correctly. -echo Instead the PATH will be used to find the java executable. -echo. -set JAVA_EXE=java -goto startConfig - -:startConfig -set LIB_DIR=%~dp0..\classpath;%~dp0..\lib - -if "%JAVA_OPTS%" == "" set JAVA_OPTS=-Xms12m -Xmx24m - -SET JAVA_PARAMS=-cp %LIB_DIR%\* %JAVA_OPTS% org.apache.nifi.toolkit.flowanalyzer.FlowAnalyzerDriver - -cmd.exe /C ""%JAVA_EXE%" %JAVA_PARAMS% %* "" - diff --git a/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/flow-analyzer.sh b/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/flow-analyzer.sh deleted file mode 100755 index 6785ae6634..00 --- a/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/flow-analyzer.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh -# -#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. -# -# - -# Script structure inspired from Apache Karaf and other Apache projects with similar startup approaches - -SCRIPT_DIR=$(dirname "$0") -SCRIPT_NAME=$(basename "$0") -NIFI_TOOLKIT_HOME=$(cd "${SCRIPT_DIR}" && cd .. && pwd) -PROGNAME=$(basename