proxygen-cli 4.0.0__py3-none-any.whl → 4.0.2__py3-none-any.whl

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.
@@ -10,6 +10,7 @@ import proxygen_cli.cli.command_credentials as cmd_credentials
10
10
  from proxygen_cli.lib.credentials import Credentials
11
11
  CLIENT_ID = os.environ["PROXYGEN_CLIENT_ID"]
12
12
  CLIENT_SECRET = os.environ["PROXYGEN_CLIENT_SECRET"]
13
+ # added below urls to resolve sonar cloud issues.
13
14
  KEYCLOAK_URL = "https://identity.prod.api.platform.nhs.uk/realms/api-producers"
14
15
  MOCK_KEYCLOAK_URL = "https://mock-keycloak-url.nhs.uk"
15
16
  BASE_URL_LABEL = "base_url: "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proxygen-cli
3
- Version: 4.0.0
3
+ Version: 4.0.2
4
4
  Summary: CLI for interacting with NHSD APIM's proxygen service
5
5
  Author: Ben Strutt
6
6
  Author-email: ben.strutt1@nhs.net
@@ -38,9 +38,10 @@ After installation, the `proxygen` executable is available. Typing `proxygen` di
38
38
  ### Settings
39
39
  To specify the API you are developing for, use:
40
40
  ```
41
- proxygen settings set api <API-NAME>
41
+ proxygen settings set api <API-NAME> --env <ptl/prod>
42
42
  ```
43
43
  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.
44
+ Parameter --env is optional, if the environment is not provided then CLI will default to Prod.
44
45
 
45
46
 
46
47
  ### Credentials
@@ -54,9 +55,10 @@ If you are setting up user access for the first time you will first need to requ
54
55
 
55
56
  To setup the Proxygen CLI credentials for the first time with user access enter the following command:
56
57
  ```
57
- proxygen credentials set
58
+ proxygen credentials set --env <ptl/prod>
58
59
  ```
59
60
  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.
61
+ Parameter --env is optional, if the environment is not provided then CLI will default to Prod.
60
62
 
61
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.
62
64
 
@@ -69,16 +71,17 @@ After having set up your API using the instructions at [Getting set up with prox
69
71
 
70
72
  Using this information enter the following command:
71
73
  ```
72
- proxygen credentials set private_key_path <PATH_TO_PRIVATE_KEY> key_id <KEY_ID_FOR_PRIVATE_KEY> client_id <MACHINE_USER_CLIENT_ID>
74
+ proxygen credentials set private_key_path <PATH_TO_PRIVATE_KEY> key_id <KEY_ID_FOR_PRIVATE_KEY> client_id <MACHINE_USER_CLIENT_ID> --env <ptl/prod>
73
75
  ```
74
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
+ Parameter --env is optional, if the environment is not provided then CLI will default to Prod.
75
78
 
76
79
  > **_NOTE:_** If you are switching between using user access and machine-user access bare in mind:
77
80
  > - proxygen-cli will favour user access if username and password credentials are set
78
81
  > - User access uses proxygen-cli-user-client as a client_id. If you switch between access modes remember to switch the client_id
79
82
  > - The value for client_secret should remain untouched as it is not used for machine-user access
80
83
  > - If you lose the client_secret for then proxygen-cli-user-client then reach out to the platforms-api-producer-support channel for it
81
-
84
+ > - From version 4.0.0 CLI will prompt for client_id and client_secret instead of setting automatically.
82
85
 
83
86
  ## Commands
84
87
  Commands are documented inside the CLI itself.
@@ -100,7 +103,7 @@ Use the following command to publish an API specification:
100
103
  ```
101
104
  # Production
102
105
  proxygen spec publish <path_to_spec>
103
-
106
+
104
107
  # UAT
105
108
  proxygen spec publish <path_to_spec> --uat
106
109
  ```
@@ -18,7 +18,7 @@ proxygen_cli/lib/spec.py,sha256=EeInv8C_Q9Tfcuma0xO3zFaUgJYY5p1NdogKNMmPlG8,3037
18
18
  proxygen_cli/lib/spec_server.py,sha256=KQZa_D9AcV7zuo0PymkqiytCMuUj8uUIRchL7US-bSk,1042
19
19
  proxygen_cli/lib/version.py,sha256=Hd-u_0SRmkKLFY0UShahb1_Eb-qO6pdO1AEFXl-cI8M,495
20
20
  proxygen_cli/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- proxygen_cli/test/command_credentials_test.py,sha256=rPqG_xI7hZvoTDtwHbdFb3UrZETTIgCZLIemlpXxQWo,11000
21
+ proxygen_cli/test/command_credentials_test.py,sha256=fB6NH1fwBsmEeJuuNYIfIjUh7yPidV-HrhDCWl555eU,11050
22
22
  proxygen_cli/test/command_instance_test.py,sha256=eT_WQOLNMYN2yf9T5M1neziEprUF5DgUMzOx8O09mAw,13013
23
23
  proxygen_cli/test/command_main_test.py,sha256=ecbJJl8m7AWruHf_1uEKIvq_kBRib-ozOFK9JP5XeAk,1382
24
24
  proxygen_cli/test/command_pytest_nhsd_apim_token_test.py,sha256=vtonBsWEuOHBP3MAg0QRI10ZqH0-_xqR8aOXIXEgwpM,688
@@ -31,7 +31,7 @@ proxygen_cli/test/fixtures/client.pem,sha256=of0DmJ2vSdD8Ug2xVXwv0rVB1smmqBPbddJ
31
31
  proxygen_cli/test/fixtures/secret.txt,sha256=EcT1Cxom6voGR8HJ-X0L5b-W5cdvsnT4MACY-hOMdxI,30
32
32
  proxygen_cli/test/mock_private_key.py,sha256=TLxLYUmq2nVQYHa7dJ61sDavh-BjTZ9dhJZwcjELY74,570
33
33
  proxygen_cli/test/validate_cli_version_test.py,sha256=qmkFX1sKfTm96AjpwOTYIsJoV10OxZ25Bu5z-234PvA,786
34
- proxygen_cli-4.0.0.dist-info/METADATA,sha256=i2ftrr_TdE7hODKauBHNtLcoPVU4x4xKAJBaszP-8no,6523
35
- proxygen_cli-4.0.0.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
36
- proxygen_cli-4.0.0.dist-info/entry_points.txt,sha256=dJloORmm8rKsrnMVatQD23--gsD49TTCfv565S4z6Yo,63
37
- proxygen_cli-4.0.0.dist-info/RECORD,,
34
+ proxygen_cli-4.0.2.dist-info/METADATA,sha256=oOmuP_6_GEddArZtO0MacT20jdCkhyyX0POfUBkTLvI,6962
35
+ proxygen_cli-4.0.2.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
36
+ proxygen_cli-4.0.2.dist-info/entry_points.txt,sha256=dJloORmm8rKsrnMVatQD23--gsD49TTCfv565S4z6Yo,63
37
+ proxygen_cli-4.0.2.dist-info/RECORD,,