Skip to content

Commit

Permalink
Add support to add a trusted CA or allow insecure connection
Browse files Browse the repository at this point in the history
Add support for 'verify' to specify trusted CA or allow insecure conn…

Co-authored-by: Corentin Peuvrel <[email protected]>
  • Loading branch information
cpeuvrel and Corentin Peuvrel committed Jul 1, 2024
1 parent d719fe9 commit 6732c0a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ IAMRoleAnywhereSession will take multiple arguments:
| session_duration | The duration, in seconds, of the role session. The value specified can range from 900 seconds (15 minutes) up to 3600 seconds (1 hour). | int | 3600 |
| service_name | An identifier for the service, used to build the botosession. | string | rolesanywhere |
| endpoint | Roles Anywhere API endpoint to use | string | '{service_name}.{region_name}.amazonaws.com' |
| verify | Whether to validate SSL certificates, or the path to a trusted certificate authority | bool or str | None |
| proxies | Proxy endpoint(s) for use behind private networks with a proxy. | dict | `{}` |
| proxies_config | A dictionary of additional proxy configurations. | dict | `{}` |

Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ IAMRoleAnywhereSession will take multiple arguments:
| session_duration | The duration, in seconds, of the role session. The value specified can range from 900 seconds (15 minutes) up to 3600 seconds (1 hour). | int | 3600 |
| service_name | An identifier for the service, used to build the botosession. | string | rolesanywhere |
| endpoint | Roles Anywhere API endpoint to use | string | {service_name}.{region_name}.amazonaws.com' |
| verify | Whether to validate SSL certificates, or the path to a trusted certificate authority | bool or str | None |
| proxies | Proxy endpoint(s) for use behind private networks with a proxy. | dict | `{}` |
| proxies_config | A dictionary of additional proxy configurations. | dict | `{}` |
3 changes: 2 additions & 1 deletion src/iam_rolesanywhere_session/iam_rolesanywhere_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def __init__(
region: Optional[str] = "us-east-1",
service_name: Optional[str] = "rolesanywhere",
endpoint: Optional[str] = None,
verify: Optional[Union[str, bool]] = None,
proxies: Optional[ProxyConfig] = {},
proxies_config: Optional[AdditionalProxyConfig] = {},
) -> None:
Expand All @@ -125,7 +126,7 @@ def __init__(
self.proxies = proxies
self.proxies_config = proxies_config
self._session = URLLib3Session(
proxies=self.proxies, proxies_config=self.proxies_config
proxies=self.proxies, proxies_config=self.proxies_config, verify=verify
)

self._request_signer = IAMRolesAnywhereSigner(
Expand Down

0 comments on commit 6732c0a

Please sign in to comment.