Skip to content

Commit

Permalink
Ensure encryption arguments are passed to artifact (#3147)
Browse files Browse the repository at this point in the history
currently, as `EncryptionArgs` are never passed to the artifact, the
artifact defaults to the auto-generated x509 cert at all times. this
patch ensures that `EncryptionArgs` are being read from the given spec,
and therefore enables custom x509 certificates for encryption. small
typo fix included, too.
  • Loading branch information
zined authored Dec 7, 2023
1 parent beec682 commit 8a3da80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion artifacts/definitions/Server/Utils/CreateCollector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ sources:
)
LET use_server_cert = encryption_scheme =~ "x509"
AND NOT encryption_args.public_key =~ "----BEGIN CERTIFICATE-----"
AND NOT encryption_args.public_key =~ "-----BEGIN CERTIFICATE-----"
AND log(message="Pubkey encryption specified, but no cert/key provided. Defaulting to server frontend cert")
-- For x509, if no public key cert is specified, we use the
Expand Down
1 change: 1 addition & 0 deletions bin/offline.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ SELECT * FROM Artifact.Server.Utils.CreateCollector(
target=Spec.Target,
target_args=Spec.TargetArgs,
encryption_scheme=Spec.EncryptionScheme,
encryption_args=Spec.EncryptionArgs,
opt_verbose=Spec.OptVerbose,
opt_banner=Spec.OptBanner,
opt_prompt=Spec.OptPrompt,
Expand Down

0 comments on commit 8a3da80

Please sign in to comment.