Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
475c8ea
[DEV-49774] Added iam access variables
FlorinCR May 21, 2025
c381855
[DEV-49774] Added iam access variables
FlorinCR May 21, 2025
16ea821
[DEV-49774] Added iam access variables
FlorinCR May 21, 2025
e0390b0
[DEV-49774] Updated with stsclient
FlorinCR May 21, 2025
50366d8
[DEV-49774] Updated with stsclient
FlorinCR May 21, 2025
5a0068a
[DEV-49774] Updated with stsclient
FlorinCR May 21, 2025
a929e34
[DEV-49774] Updated config
FlorinCR May 21, 2025
3cac48c
[DEV-49774] Updated config
FlorinCR May 21, 2025
2113aa6
[DEV-49774] Updated config
FlorinCR May 21, 2025
50fa3ee
[DEV-49774] Updated config
FlorinCR May 21, 2025
6462c87
[DEV-49774] Updated config #1
FlorinCR May 21, 2025
f1047df
Merge branch 'master' into DEV-49774_add_iam_access
FlorinCR May 23, 2025
f5dbc8d
[DEV-49774] Updated config #1.1
FlorinCR May 23, 2025
b6514a0
[DEV-49774] Updated config #1.2
FlorinCR May 27, 2025
598b757
[DEV-49774] Updated config #1.3
FlorinCR May 27, 2025
d16dcd9
[DEV-49774] Updated config #1.31
FlorinCR May 27, 2025
c140f45
[DEV-49774] Updated config #1.32
FlorinCR May 27, 2025
9fcfad4
[DEV-49774] Updated config #1.33
FlorinCR May 27, 2025
701a116
[DEV-49774] Updated config #1.34
FlorinCR May 27, 2025
498ae46
[DEV-49774] Updated config #1.34
FlorinCR May 27, 2025
ebc6c60
[DEV-49774] Optimized code and added s3 creds def
FlorinCR May 28, 2025
b22260f
[DEV-49774] Optimized code and added s3 creds def #1
FlorinCR May 28, 2025
594c5d9
[DEV-49774] Optimized code and added s3 creds def #1.1
FlorinCR May 30, 2025
2762733
[DEV-49774] Optimized code and added s3 creds def #1.2
FlorinCR Jun 2, 2025
c33e162
[DEV-49774] Optimized code and added s3 creds def #1.3
FlorinCR Jun 2, 2025
87be75a
[DEV-49774] Optimized code and added s3 creds def #1.4
FlorinCR Jun 2, 2025
30e7794
[DEV-49774] Optimized code and added s3 creds def #1.5
FlorinCR Jun 2, 2025
5ef75df
[DEV-49774] Optimized code and added s3 creds def #1.6
FlorinCR Jun 2, 2025
9d28367
[DEV-49774] Optimized code and added s3 creds def #1.7
FlorinCR Jun 2, 2025
52ea94c
[DEV-49774] Optimized code and added s3 creds def #1.8
FlorinCR Jun 2, 2025
8bd457f
[DEV-49774] Optimized code and added s3 creds def #1.9
FlorinCR Jun 2, 2025
48c46cc
[DEV-49774] Optimized code and added s3 creds def #2
FlorinCR Jun 3, 2025
605c15f
[DEV-49774] Optimized code and added s3 creds def #2
FlorinCR Jun 3, 2025
7540fb7
[DEV-49774] Optimized code and added s3 creds def #2.1
FlorinCR Jun 3, 2025
8224ddd
[DEV-49774] Optimized code and added s3 creds def #2.2
FlorinCR Jun 3, 2025
b58186a
[DEV-49774] Optimized code and added s3 creds def #2.3
FlorinCR Jun 3, 2025
9e1c645
[DEV-49774] Optimized code and added s3 creds def #2.4
FlorinCR Jun 3, 2025
f8cded7
[DEV-49774] Optimized code and added s3 creds def #2.5
FlorinCR Jun 3, 2025
bf51308
[DEV-49774] Optimized code and added s3 creds def #2.6
FlorinCR Jun 3, 2025
7921a45
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
67c6230
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
2ef224a
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
c268577
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
35927da
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
e87caf3
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
1a37f60
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
be58e9f
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
f9e2159
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
d0dda7d
[DEV-49774] Set debug messages on fail
FlorinCR Jun 4, 2025
9f0d589
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
643e6f7
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
3519a82
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
f64c067
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
aa6857e
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
e25ffa7
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
3bc3b97
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
674aa94
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
d068a2c
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
4af198f
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
8062754
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
1078290
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
1f363c1
[DEV-49774] Set debug messages on fail
FlorinCR Jun 11, 2025
995b787
[DEV-49774] Set debug messages on fail
FlorinCR Jun 12, 2025
3fbf55e
[DEV-49774] Set debug messages on fail
FlorinCR Jun 12, 2025
6c5a9ca
[DEV-49774] Set debug messages on fail
FlorinCR Jun 12, 2025
932672a
[DEV-49774] Set debug messages on fail
FlorinCR Jun 12, 2025
602cebf
[DEV-49774] Set debug messages on fail
FlorinCR Jun 12, 2025
f5b150c
[DEV-49774] Set debug messages on fail
FlorinCR Jun 12, 2025
21b7724
[DEV-49774] Set debug messages on fail
FlorinCR Jun 12, 2025
4f20ac7
Merge branch 'master' into DEV-49774_add_iam_access
FlorinCR Jun 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ public function getConfigTreeBuilder()
->scalarNode('secret_access_key')
->isRequired()
->end()
->arrayNode('role_based')
->canBeEnabled()
->children()
->scalarNode('web_identity_token_file')
->isRequired()
->end()
->scalarNode('role_arn')
->isRequired()
->end()
->scalarNode('session_name')
->isRequired()
->end()
->end()
->end()
->arrayNode('large_payload_client')
->canBeEnabled()
->children()
Expand Down
50 changes: 12 additions & 38 deletions DependencyInjection/Kfz24QueueExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
use Aws\Sts\StsClient;
use Aws\Credentials\CredentialProvider;

/**
* This is the class that loads and manages your bundle configuration.
Expand All @@ -38,43 +36,19 @@ public function load(array $configs, ContainerBuilder $container)
$adapterClass = $container->getParameter(sprintf('kfz24.queue.%s.adapter.class', $clientType));
$clientClass = $container->getParameter(sprintf('kfz24.queue.%s.client.class', $clientType));

if (empty($client['role_based']) || empty($client['role_based']['web_identity_token_file'])) {
$adapterDefinition = new Definition($adapterClass, [
[
'region' => $client['region'],
'endpoint' => $client['endpoint'],
'credentials' => [
'key' => $client['access_key'],
'secret' => $client['secret_access_key']
],
'version' => $apiVersion
]
]);
} else {
$stsClient = new StsClient([
'region' => $client['region'],
'version' => $apiVersion,
$adapterDefinition = new Definition($adapterClass, [
[
'region' => $client['region'],
'endpoint' => $client['endpoint'],
'credentials' => [
'webIdentityTokenFile' => $client['role_based']['web_identity_token_file'],
'roleArn' => $client['role_based']['role_arn'],
'roleSessionName' => $client['role_based']['session_name'],
]
]);

$provider = CredentialProvider::assumeRoleWithWebIdentityCredentialProvider(['stsClient' => $stsClient]);
// Cache the results in a memoize function to avoid loading and parsing
// the ini file on every API operation
$provider = CredentialProvider::memoize($provider);
$adapterDefinition = new Definition($adapterClass, [
[
'region' => $client['region'],
'version' => $apiVersion,
'credentials' => $provider
]
]);
}

'key' => $client['access_key'],
'secret' => $client['secret_access_key']
],
'version' => $apiVersion
]
]);
$adapterDefinition->setPublic(false);

$adapterDefinitionName = sprintf('kfz24.queue.adapter.%s', $name);
$container->setDefinition($adapterDefinitionName, $adapterDefinition);

Expand Down Expand Up @@ -171,4 +145,4 @@ private function buildS3ClientDefinition(string $definitionName, array $config,

$container->setDefinition($definitionName, $s3ClientDefinition);
}
}
}
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ kfz24_queue:
resource: "https://sqs.eu-central-1.amazonaws.com/123456789012/another-queue"
access_key: "AKIAABCDEFGHIJKLMNOP"
secret_access_key: "s3CR3t4Cc3S5K3y"
role_based:
web_identity_token_file: "%AWS_WEB_IDENTITY_TOKEN_FILE%"
role_arn: "arn-role-XYZ"
session_name: "ABC-session-name"
large_payload_client:
region: "eu-central-1"
endpoint: "http://s3-eu-central-1.amazonaws.com/consumer_bucket"
Expand Down
2 changes: 2 additions & 0 deletions Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ parameters:
services:
kfz24.queue.message_validator:
class: Aws\Sns\MessageValidator
public: true
arguments:
$certClient: "@kfz24.aws.cached_cert_client"
kfz24.aws.cached_cert_client:
public: true
class: Kfz24\QueueBundle\Client\Aws\CachedCertClient
Loading