Skip to content

Commit 42dceeb

Browse files
committed
Allow requests.post(verify=) to be controlled
1 parent c5860d9 commit 42dceeb

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ The backend to connect to is controlled by these settings:
116116
* `TINYAUTH_ENDPOINT`: The `https://` endpoint to access to authorize a HTTP request.
117117
* `TINYAUTH_ACCESS_KEY_ID`: Access key for a tinyauth user with permission to authorize requests for this service.
118118
* `TINYAUTH_SECRET_ACCESS_KEY`: Secret key for this user
119+
* `TINYAUTH_ENDPOINT_VERIFY`: Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use. Defaults to True.
119120

120121
Each permission check is for a permission and an `arn` that globally identifies an instance of a resource. An arn is constructed in the following form:
121122

flask_tinyauth/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def call(api, request):
4242
'Content-Type': 'application/json',
4343
},
4444
json=request,
45+
verify=current_app.config.get('TINYAUTH_VERIFY', True),
4546
)
4647
except requests.exceptions.ConnectionError as e:
4748
logger.critical('Unable to connect to authentication backend', exc_info=e)

0 commit comments

Comments
 (0)