Skip to content

Commit 22a1697

Browse files
authored
Merge pull request #8 from ultradns/feature/oauth2-security-scheme
Feature/oauth2 security scheme
2 parents c4b0a3e + 1ff45e9 commit 22a1697

5 files changed

Lines changed: 119 additions & 138 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.0] - 2025-07-17
11+
12+
### Changed
13+
- Switched from a pre-request script Auth workflow to the baked in OAuth 2.0
14+
- This is necessary for OpenAPI spec generation, for the YAML to be fully usable out-of-box in other tools
15+
- In Postman, this necessitates an additional step when authentication
16+
- Set the `username` and `password` in your environment (same as before)
17+
- Go to the `Authorization` tab under the collection and click `Get New Access Token`
18+
- Once the initial token has been requested, Postman will handle auto-refresh (so long as the refresh token is not expired)
19+
- Cleaned up some of the in-collection documentation to make it more tool-agnostic for te OpenAPI spoec
20+
- The Postman-specific functionalities will be detailed in the public workspace docs
21+
- Updated `README`
22+
1023
## [1.0.1] - 2025-06-18
1124

1225
### Added

README.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,39 +26,50 @@ Alternatively, you can import the files directly from this repository:
2626
2. Select **Import**
2727
3. Drag the files from `src/` to the application
2828

29-
## Authentication and Utilities
29+
### Authentication
3030

31-
The collection-level pre-request script manages authentication and provides helper functions.
31+
1. **Set your credentials**
32+
- Define the following environment variables:
33+
34+
* `username` – your UDNS username
35+
* `password` – your UDNS password
36+
37+
2. **Manually obtain your token (first time)**
38+
- In Postman:
39+
40+
* Open the **Authorization** tab at the collection level
41+
* Click **"Get New Access Token"**, then **"Use Token"**
42+
43+
3. **Token refresh**
44+
- After the initial token is retrieved, Postman will automatically refresh it when needed—provided the refresh token remains valid.
45+
46+
## Utilities
47+
48+
The collection-level pre-request script provides helper functions.
3249

3350
Since `utils` is defined globally by not using a declaration keyword, it is accessible to request-level scripts. This allows for the definition of reusable functions for our requests. Utility functions can be invoked like so:
3451

3552
```javascript
3653
utils.functionName()
3754
```
3855

39-
### Username/Password
40-
41-
For the pre-request script to run, you must set `username` and `password` variables containing your UDNS credentials in an environment. UDNS uses OAuth2 to generate an access token. The access token and refresh token will also be stored in your environment along with a timestamp, so the script knows when to refresh.
42-
4356
## Resources
4457

4558
The collection is organized into folders, each representing a base resource (ex: `zones`) or a specific functionality (ex: `push notifications`).
4659

4760
- **Zones**: Contains the DNS configuration. Some resources are not available in the latest "version" of the API, hence why "snapshot/restore" use the "v1" endpoint.
4861

62+
- **Records**: APIs for adding/updating/deleting RRsets for a zone. These APIs use RRset DTO definitions and pre-request/post-request scripts for managing environment variables and POST body content.
63+
4964
- **Tasks**: Operations that produce background tasks will return a `202` status code and have an `x-task-id` header. This ID is stored under the `currentTask` variable in the environment.
5065

5166
- **Reports**: After you request a report, retrieve it from the `results` endpoint using the report ID. This ID is stored in the post-request script, similar to tasks.
5267

53-
- **Webhook**: A set of 3 requests related to UDNS's push notification feature.
54-
55-
- **Subaccounts**: APIs exclusive to accounts that contain child accounts. If you don't have access to this feature, they'll produce an error.
56-
57-
- **Records**: APIs for adding/updating/deleting RRsets for a zone. These APIs use RRset DTO definitions and pre-request/post-request scripts for managing environment variables and POST body content.
68+
- **Webhook**: A set of 3 requests related to UDNS's push notification feature.\
5869

59-
## Bypassing Automated Authentication
70+
- **DNSSEC Multi-Signer**
6071

61-
To manually provide your Bearer token, go to the "Authorization" tab of the collection and modify the value. This would be necessary, as an example, to use a token produced by the subaccount authorization endpoint. Remember to revert it to the `{{accessToken}}` variable after you're done.
72+
- **Traffic Management**
6273

6374
## Contributing
6475

src/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,20 @@ The easiest way to get started is to:
3333
## Environment Setup
3434

3535
After importing the collection, you'll need to:
36-
1. Create a new environment
37-
2. Set the following variables:
38-
- `username`: Your UltraDNS account username
39-
- `password`: Your UltraDNS account password
4036

41-
The collection's pre-request script will automatically handle authentication using these credentials.
37+
1. **Set your credentials**
38+
- Define the following environment variables:
39+
40+
* `username` – your UDNS username
41+
* `password` – your UDNS password
42+
43+
2. **Manually obtain your token (first time)**
44+
- In Postman:
45+
46+
* Open the **Authorization** tab at the collection level
47+
* Click **"Get New Access Token"**, then **"Use Token"**
48+
49+
3. **Token refresh**
50+
- After the initial token is retrieved, Postman will automatically refresh it when needed—provided the refresh token remains valid.
4251

4352
For more detailed information about using the collection, please refer to the [main README](../README.md).

0 commit comments

Comments
 (0)