upload/aws: add support for session tokens
If a user uses a temporary access key for login, a session token is also needed. This commit adds support for it to the internal aws library and also to the osbuild-upload-aws helper. Note that this doesn't affect the main osbuild-composer executable nor the worker. Everything here should work as before and session tokens are not supported. Something for a follow up if anyone needs it. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
bb2f866470
commit
579a5df698
4 changed files with 10 additions and 6 deletions
|
|
@ -208,7 +208,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
|
|||
osbuildJobResult.Success = true
|
||||
osbuildJobResult.UploadStatus = "success"
|
||||
case *target.AWSTargetOptions:
|
||||
a, err := awsupload.New(options.Region, options.AccessKeyID, options.SecretAccessKey)
|
||||
a, err := awsupload.New(options.Region, options.AccessKeyID, options.SecretAccessKey, "")
|
||||
if err != nil {
|
||||
appendTargetError(osbuildJobResult, err)
|
||||
return nil
|
||||
|
|
@ -244,7 +244,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
|
|||
osbuildJobResult.Success = true
|
||||
osbuildJobResult.UploadStatus = "success"
|
||||
case *target.AWSS3TargetOptions:
|
||||
a, err := awsupload.New(options.Region, options.AccessKeyID, options.SecretAccessKey)
|
||||
a, err := awsupload.New(options.Region, options.AccessKeyID, options.SecretAccessKey, "")
|
||||
if err != nil {
|
||||
appendTargetError(osbuildJobResult, err)
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue