Commit 0a78513c authored by mashony's avatar mashony
Browse files

fix: Rename auth.yaml to auth.yml

parent f5dcb86a
......@@ -8,7 +8,7 @@ Provides functionality for authorization.
`pip install -i https://pypi-int.prozorro.sale prozorro-auth`
### Auth file
CBD3 uses the `auth.yaml` 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.yaml
auth.yml
```yaml
brokers:
some_broker:
......@@ -88,7 +88,7 @@ brokers:
- bids
```
### Usage
**Required**: call `load_auth` on start app, to load `auth.yaml` 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
```
......@@ -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.yaml"
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.yaml"
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
......@@ -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.yaml')
AUTH_FILE = os.environ.get('AUTH_FILE', '/secrets/auth.yml')
async def all_start_stop_log(app: web.Application) -> AsyncGenerator[None, None]:
......
......@@ -33,7 +33,7 @@ class UserTestCase(unittest.TestCase):
class AuthTestCase(unittest.TestCase):
auth_file = 'test/test_secrets/auth.yaml'
auth_file = 'test/test_secrets/auth.yml'
def test_load_auth(self):
auth.AUTH_FILE = None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment