Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
prozorro-sale
Prozorro Auth
Commits
7bd4fe16
Commit
7bd4fe16
authored
Nov 24, 2021
by
dmitry.mashoshin
Browse files
Merge branch 'bigfix/update-auth-yaml-name' into 'master'
fix: Rename auth.yaml to auth.yml See merge request
!55
parents
f5dcb86a
0a78513c
Changes
6
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
7bd4fe16
...
...
@@ -8,7 +8,7 @@ Provides functionality for authorization.
`pip install -i https://pypi-int.prozorro.sale prozorro-auth`
### Auth file
CBD3 uses the
`auth.y
a
ml`
file to store broker's credentials
CBD3 uses the
`auth.yml`
file to store broker's credentials
#### Structure:
```
yaml
...
...
@@ -61,7 +61,7 @@ If `ips: []` - broker does not have access.
#### Example:
auth.y
a
ml
auth.yml
```
yaml
brokers
:
some_broker
:
...
...
@@ -88,7 +88,7 @@ brokers:
-
bids
```
### Usage
**Required**
: call
`load_auth`
on start app, to load
`auth.y
a
ml`
into memory. The auth data will be available in variable
`AUTH_FILE`
.
**Required**
: call
`load_auth`
on start app, to load
`auth.yml`
into memory. The auth data will be available in variable
`AUTH_FILE`
.
#### AclContext
Object that keeps
`user`
data and
`acc_token `
...
...
@@ -132,4 +132,4 @@ HASH: 1e622638aa1c7504230130a7814d39aff39cbe09d6dcac3c4be46a2cdfafe4b6
TOKEN: 3cceb049-086d-4988-bdd4-ae62bb2038ac
HASH: 1e622638aa1c7504230130a7814d39aff39cbe09d6dcac3c4be46a2cdfafe4b6
-----------------------------------------------------------------------
```
\ No newline at end of file
```
docker-compose.yml
View file @
7bd4fe16
...
...
@@ -7,7 +7,7 @@ services:
command
:
python -m prozorro_sale.auth.api
environment
:
&base_app_environment
AUCTIONS_API
:
"
http://0.0.0.0:7777"
AUTH_FILE
:
"
/secrets/auth.y
a
ml"
AUTH_FILE
:
"
/secrets/auth.yml"
DOMAIN
:
"
localhost"
auth-databridge
:
...
...
@@ -20,7 +20,7 @@ services:
image
:
"
${IMAGE_TEST}"
environment
:
AUCTIONS_API
:
"
http://localhost"
AUTH_FILE
:
"
test/test_secrets/auth.y
a
ml"
AUTH_FILE
:
"
test/test_secrets/auth.yml"
DOMAIN
:
"
localhost"
auth-test-unit
:
...
...
@@ -52,4 +52,4 @@ services:
<<
:
*local_app_environment
AIO_PORT
:
8082
ports
:
-
8082:8082
\ No newline at end of file
-
8082:8082
secrets/auth.y
a
ml
→
secrets/auth.yml
View file @
7bd4fe16
File moved
src/prozorro_sale/auth/api/main.py
View file @
7bd4fe16
...
...
@@ -14,7 +14,7 @@ from prozorro_sale.auth.errors import request_errors_middleware
LOG
=
tools
.
logger
.
get_custom_logger
(
__name__
)
SWAGGER_DOC_AVAILABLE
=
os
.
getenv
(
'SWAGGER_DOC'
,
False
)
AUTH_FILE
=
os
.
environ
.
get
(
'AUTH_FILE'
,
'/secrets/auth.y
a
ml'
)
AUTH_FILE
=
os
.
environ
.
get
(
'AUTH_FILE'
,
'/secrets/auth.yml'
)
async
def
all_start_stop_log
(
app
:
web
.
Application
)
->
AsyncGenerator
[
None
,
None
]:
...
...
test/test_secrets/auth.y
a
ml
→
test/test_secrets/auth.yml
View file @
7bd4fe16
File moved
test/unit/test_auth.py
View file @
7bd4fe16
...
...
@@ -33,7 +33,7 @@ class UserTestCase(unittest.TestCase):
class
AuthTestCase
(
unittest
.
TestCase
):
auth_file
=
'test/test_secrets/auth.y
a
ml'
auth_file
=
'test/test_secrets/auth.yml'
def
test_load_auth
(
self
):
auth
.
AUTH_FILE
=
None
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment