proxygen-cli 2.1.13__tar.gz → 2.1.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/PKG-INFO +34 -12
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/README.md +33 -11
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/constants.py +1 -1
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/pyproject.toml +1 -1
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/__init__.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/cli/command_credentials.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/cli/command_docker.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/cli/command_instance.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/cli/command_main.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/cli/command_pytest_nhsd_apim_token.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/cli/command_secret.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/cli/command_settings.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/cli/command_spec.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/auth.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/credentials.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/dot_proxygen.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/output.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/proxygen_api.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/settings.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/spec.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/spec_server.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/lib/version.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/__init__.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/command_credentials_test.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/command_instance_test.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/command_main_test.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/command_pytest_nhsd_apim_token_test.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/command_secret_test.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/command_settings_test.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/command_spec_test.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/conftest.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/fixtures/client.key +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/fixtures/client.pem +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/fixtures/secret.txt +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/mock_private_key.py +0 -0
- {proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/validate_cli_version_test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: proxygen-cli
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.14
|
|
4
4
|
Summary: CLI for interacting with NHSD APIM's proxygen service
|
|
5
5
|
Home-page: https://github.com/NHSDigital/proxygen-cli
|
|
6
6
|
Author: Ben Strutt
|
|
@@ -36,28 +36,50 @@ After installation, the `proxygen` executable is available. Typing `proxygen` di
|
|
|
36
36
|
|
|
37
37
|
## Configuration
|
|
38
38
|
|
|
39
|
+
|
|
40
|
+
### Settings
|
|
41
|
+
To specify the API you are developing for, use:
|
|
42
|
+
```
|
|
43
|
+
proxygen settings set api <API-NAME>
|
|
44
|
+
```
|
|
45
|
+
Your user must have the appropriate permissions for managing instances, secrets, and specifications related to the specified API. If permissions are insufficient, commands will fail. Reach out to the `platforms-api-producer-support` channel for assistance with permissions.
|
|
46
|
+
|
|
47
|
+
|
|
39
48
|
### Credentials
|
|
49
|
+
There are two ways to authenticate via the Proxygen CLI. Either via user login credentials such as a username and password or as a machine user using your private key and client_id.
|
|
40
50
|
|
|
41
|
-
|
|
51
|
+
#### Setting up for user access
|
|
52
|
+
If you are setting up user access for the first time you will first need to request a user account. Contact the [platforms-api-producer-support](https://nhsdigital-platforms.slack.com/archives/C016JRWN6AY) channel asking for a proxygen user account to be set up providing:
|
|
42
53
|
|
|
43
|
-
|
|
54
|
+
- Your nhs.net email address
|
|
55
|
+
- The proxygen-managed api/s your account will need access to
|
|
56
|
+
|
|
57
|
+
To setup the Proxygen CLI credentials for the first time with user access enter the following command:
|
|
44
58
|
```
|
|
45
59
|
proxygen credentials set
|
|
46
60
|
```
|
|
47
|
-
|
|
61
|
+
The CLI will ask you for your username, and password. These credentials will be securely stored on your local machine in the directory ~/.proxygen/credentials.yaml. The client_id and secret used for user access will be automatically added to this file after running the command.
|
|
48
62
|
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
proxygen credentials set <KEY> <VALUE>
|
|
52
|
-
```
|
|
63
|
+
Your user must have permissions to manipulate instances/secrets/specs for the API you set here. If you do not have sufficient permissions commands will fail. If you believe your permissions are incorrect, contact the API platform team via the [platforms-api-producer-support](https://nhsdigital-platforms.slack.com/archives/C016JRWN6AY) channel.
|
|
53
64
|
|
|
65
|
+
#### Setting up for machine-user access
|
|
66
|
+
After having set up your API using the instructions at [Getting set up with proxy generator](https://nhsd-confluence.digital.nhs.uk/display/APM/Getting+set+up+with+proxy+generator), you should have the following:
|
|
54
67
|
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
- A private key from a key pair for machine user access
|
|
69
|
+
- The key id for that specific key pair
|
|
70
|
+
- The client_id for your api machine user access (usually <your-api-name>-client)
|
|
71
|
+
|
|
72
|
+
Using this information enter the following command:
|
|
57
73
|
```
|
|
58
|
-
proxygen
|
|
74
|
+
proxygen credentials set private_key_path <PATH_TO_PRIVATE_KEY> key_id <KEY_ID_FOR_PRIVATE_KEY> client_id <MACHINE_USER_CLIENT_ID>
|
|
59
75
|
```
|
|
60
|
-
|
|
76
|
+
The CLI will ask you for your username, and password. For machine authentication, the username and password must be left blank. The credentials will be securely stored in the directory ~/.proxygen/credentials.yaml.
|
|
77
|
+
|
|
78
|
+
> **_NOTE:_** If you are switching between using user access and machine-user access bare in mind:
|
|
79
|
+
> - proxygen-cli will favour user access if username and password credentials are set
|
|
80
|
+
> - User access uses proxygen-cli-user-client as a client_id. If you switch between access modes remember to switch the client_id
|
|
81
|
+
> - The value for client_secret should remain untouched as it is not used for machine-user access
|
|
82
|
+
> - If you lose the client_secret for then proxygen-cli-user-client then reach out to the platforms-api-producer-support channel for it
|
|
61
83
|
|
|
62
84
|
|
|
63
85
|
## Commands
|
|
@@ -11,28 +11,50 @@ After installation, the `proxygen` executable is available. Typing `proxygen` di
|
|
|
11
11
|
|
|
12
12
|
## Configuration
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
### Settings
|
|
16
|
+
To specify the API you are developing for, use:
|
|
17
|
+
```
|
|
18
|
+
proxygen settings set api <API-NAME>
|
|
19
|
+
```
|
|
20
|
+
Your user must have the appropriate permissions for managing instances, secrets, and specifications related to the specified API. If permissions are insufficient, commands will fail. Reach out to the `platforms-api-producer-support` channel for assistance with permissions.
|
|
21
|
+
|
|
22
|
+
|
|
14
23
|
### Credentials
|
|
24
|
+
There are two ways to authenticate via the Proxygen CLI. Either via user login credentials such as a username and password or as a machine user using your private key and client_id.
|
|
15
25
|
|
|
16
|
-
|
|
26
|
+
#### Setting up for user access
|
|
27
|
+
If you are setting up user access for the first time you will first need to request a user account. Contact the [platforms-api-producer-support](https://nhsdigital-platforms.slack.com/archives/C016JRWN6AY) channel asking for a proxygen user account to be set up providing:
|
|
17
28
|
|
|
18
|
-
|
|
29
|
+
- Your nhs.net email address
|
|
30
|
+
- The proxygen-managed api/s your account will need access to
|
|
31
|
+
|
|
32
|
+
To setup the Proxygen CLI credentials for the first time with user access enter the following command:
|
|
19
33
|
```
|
|
20
34
|
proxygen credentials set
|
|
21
35
|
```
|
|
22
|
-
|
|
36
|
+
The CLI will ask you for your username, and password. These credentials will be securely stored on your local machine in the directory ~/.proxygen/credentials.yaml. The client_id and secret used for user access will be automatically added to this file after running the command.
|
|
23
37
|
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
proxygen credentials set <KEY> <VALUE>
|
|
27
|
-
```
|
|
38
|
+
Your user must have permissions to manipulate instances/secrets/specs for the API you set here. If you do not have sufficient permissions commands will fail. If you believe your permissions are incorrect, contact the API platform team via the [platforms-api-producer-support](https://nhsdigital-platforms.slack.com/archives/C016JRWN6AY) channel.
|
|
28
39
|
|
|
40
|
+
#### Setting up for machine-user access
|
|
41
|
+
After having set up your API using the instructions at [Getting set up with proxy generator](https://nhsd-confluence.digital.nhs.uk/display/APM/Getting+set+up+with+proxy+generator), you should have the following:
|
|
29
42
|
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
- A private key from a key pair for machine user access
|
|
44
|
+
- The key id for that specific key pair
|
|
45
|
+
- The client_id for your api machine user access (usually <your-api-name>-client)
|
|
46
|
+
|
|
47
|
+
Using this information enter the following command:
|
|
32
48
|
```
|
|
33
|
-
proxygen
|
|
49
|
+
proxygen credentials set private_key_path <PATH_TO_PRIVATE_KEY> key_id <KEY_ID_FOR_PRIVATE_KEY> client_id <MACHINE_USER_CLIENT_ID>
|
|
34
50
|
```
|
|
35
|
-
|
|
51
|
+
The CLI will ask you for your username, and password. For machine authentication, the username and password must be left blank. The credentials will be securely stored in the directory ~/.proxygen/credentials.yaml.
|
|
52
|
+
|
|
53
|
+
> **_NOTE:_** If you are switching between using user access and machine-user access bare in mind:
|
|
54
|
+
> - proxygen-cli will favour user access if username and password credentials are set
|
|
55
|
+
> - User access uses proxygen-cli-user-client as a client_id. If you switch between access modes remember to switch the client_id
|
|
56
|
+
> - The value for client_secret should remain untouched as it is not used for machine-user access
|
|
57
|
+
> - If you lose the client_secret for then proxygen-cli-user-client then reach out to the platforms-api-producer-support channel for it
|
|
36
58
|
|
|
37
59
|
|
|
38
60
|
## Commands
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/cli/command_pytest_nhsd_apim_token.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proxygen_cli-2.1.13 → proxygen_cli-2.1.14}/proxygen_cli/test/command_pytest_nhsd_apim_token_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|