Skip to content

Commit

Permalink
Implements #1459
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jan 24, 2023
1 parent e298e7b commit 9d1684c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions IM/connectors/EC2.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ def get_connection(self, region_name, auth_data):
if 'username' in auth and 'password' in auth:
region = boto.ec2.get_region(region_name)
if region:
token = auth.get('token')
conn = boto.vpc.VPCConnection(aws_access_key_id=auth['username'],
aws_secret_access_key=auth['password'],
security_token=token,
region=region)
else:
raise Exception(
Expand Down
3 changes: 2 additions & 1 deletion doc/source/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ The available keys are:

* ``token`` indicates the OpenID token associated to the credential. This field is used in the EGI, OCCI plugins
and also to authenticate with the InfrastructureManager. To refer to the output of a command you must
use the function "command(command)" as shown in the examples.
use the function "command(command)" as shown in the examples. It can be also used in the EC2 connector
to specify the security token associated with temporary credentials issued by STS.

* ``vo`` indicates the VO name associated to the credential. This field is used in the EGI plugin.

Expand Down

0 comments on commit 9d1684c

Please sign in to comment.