Skip to content

Commit

Permalink
Merge pull request #1833 from EnterpriseDB/release/2021-09-09
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-heyer authored Sep 10, 2021
2 parents 97cbe66 + d412bed commit 8605720
Show file tree
Hide file tree
Showing 36 changed files with 1,975 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,15 @@ To choose the recovery target type for the restore, include the `--type` command

* `default` - recover to the end of the archive stream.
* `immediate` - recovery only until the database becomes consistent.
* `lsn` - recover to the LSN (Log Sequence Number).
* `name` - recover to the restore point.
* `xid` - recover to the transaction ID.
* `time` - recover to a specific timestamp.
* `preserve` - preserve the existing recovery settings.
* `standby` - add `standby_mode=on` or `standby.signal`.
* `none` - no recovery settings provided.

When `--type` is set to **name**, transaction ID (**xid**), or **time**, use the `--target` option to specify a restore point.
When `--type` is set to **lsn**, **name**, transaction ID (**xid**), or **time**, use the `--target` option to specify a restore point.

pgBackRest will automatically select the correct backup set to restore if a recovery target time is specified. Otherwise, the latest backup set will be used. To restore a specific backup set, use the `--set` option.

Expand Down
4 changes: 2 additions & 2 deletions advocacy_docs/supported-open-source/pgbackrest/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ pgBackRest is an easy-to-use backup and restore tool that aims to enable your or
!!! Note
Looking for pgBackRest documentation? Head over to [http://www.pgbackrest.org](http://www.pgbackrest.org)

pgBackRest [v2.34](https://github.com/pgbackrest/pgbackrest/releases/tag/release/2.34) is the current stable release. Release notes are on the [Releases](http://www.pgbackrest.org/release.html) page.
pgBackRest [v2.35](https://github.com/pgbackrest/pgbackrest/releases/tag/release/2.35) is the current stable release. Release notes are on the [Releases](http://www.pgbackrest.org/release.html) page.

EDB collaborates with the community on this open-source software. The packages provided in EDB repositories are technically equivalent to the packages provided by the **PostgreSQL** community. All of the use cases shown in this document are fully tested and supported by **EDB Postgres Advanced Server**.
EDB collaborates with the community on this open-source software. The packages are provided by the **PostgreSQL** community. All of the use cases shown in this document are fully tested and supported by **EDB Postgres Advanced Server**.
1 change: 1 addition & 0 deletions product_docs/docs/edbcloud/beta/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ navigation:
- using_cluster
- administering_cluster
- pricing_and_billing
- reference
- release_notes
---
214 changes: 214 additions & 0 deletions product_docs/docs/edbcloud/beta/reference/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
---
title: Using the EDB Cloud API
---

Use the EDB Cloud API to integrate directly with EDB Cloud for management activities such as cluster provisioning, de-provisioning, and scaling.

The API reference documentation is available from the [EDB Cloud portal](https://portal.edbcloud.com). The direct documentation link is [https://portal.edbcloud.com/api/docs/](https://portal.edbcloud.com/api/docs/).

To access the API, you need a token. The high-level steps to obtain a token are:
1. [Query the authentication endpoint](http://localhost:8000/edbcloud/latest/reference/#query-the-authentication-endpoint).
2. [Request the device code](http://localhost:8000/edbcloud/latest/reference/#request-the-device-code).
3. [Authorize as a user](http://localhost:8000/edbcloud/latest/reference/#authorize-as-a-user).
4. [Request the token](http://localhost:8000/edbcloud/latest/reference/#request-the-token).



## Query the Authentication Endpoint

Use the following command to get the information returned by the authentication endpoint that you need later:

```
curl https://portal.edbcloud.com/api/v1/auth/provider
```

The response returns the `clientId`, `issuerUri`, `scope`, and `audience`. For example:
```
{
"clientId": "pM8PRguGtW9yVnrsvrvpaPyyeS9fVvFh",
"issuerUri": "https://auth.edbcloud.com",
"scope": "openid profile email offline_access",
"audience": "https://portal.edbcloud.com/api"
}
```

EDB recommends you store the output in environment variables to make including them in the following calls easier. For example,

```
CLIENT_ID=pM8PRguGtW9yVnrsvrvpaPyyeS9fVvFh
ISSUER_URL=https://auth.edbcloud.com
SCOPE="openid profile email offline_access"
AUDIENCE="https://portal.edbcloud.com/api"
```
The following example calls show use these environment variables.

## Request the Device code

Use the following call to get a device code:
```
curl --request POST \
--url "$ISSUER_URL/oauth/device/code" \
--header "content-type: application/x-www-form-urlencoded" \
--data "client_id=$CLIENT_ID" \
--data "scope=$SCOPE" \
--data "audience=$AUDIENCE"
```

The response returns:

- `device_code` - the unique code for the device. When you go to the `verification_uri` in your browser-based device, this code is bound to your session. You use this code in your [request for a token](#request-the-token).
- `user_code` - the code you input at the `verification_uri` to authorize the device. You use this code when you [authorize yourself as a user](#authorize-as-a-user).
- `verification_uri` - the URL you use to authorize your device.
- `verification_uri_complete` - the complete URL you use to authorize the device. You can use this URL to embed the user code in your app's URL.
- `expires_in` indicates the lifetime (in seconds) of the `device_code` and `user_code`.
- `interval` indicates the interval (in seconds) at which the app should poll the token URL to request a token.

For example:
```
{
"device_code": "KEOY2_5YjuVsRuIrrR-aq5gs",
"user_code": "HHHJ-MMSZ",
"verification_uri": "https://auth.edbcloud.com/activate",
"expires_in": 900,
"interval": 5,
"verification_uri_complete": "https://auth.edbcloud.com/activate?user_code=HHHJ-MMSZ"
}
```

Store the device_code in an environment variable for future use. For example;

```
DEVICE_CODE=KEOY2_5YjuVsRuIrrR-aq5gs
```

## Authorize as a User

1. Go to the `verification_uri` in your web browser, enter your `user_code`, and select **Continue**.

4. Select **Confirm** on the Device Confirmation dialog.

5. Select **Continue with Microsoft Azure AD** on the EDB Cloud Welcome screen.

6. Log in with your Azure AD credentials.


## Request the Token

Use the `curl --request POST` command to request a token. For example,
```
curl --request POST \
--url "$ISSUER_URL/oauth/token" \
--header "content-type: application/x-www-form-urlencoded" \
--data "grant_type=urn:ietf:params:oauth:grant-type:device_code" \
--data "device_code=$DEVICE_CODE" \
--data "client_id=$CLIENT_ID"
```
If successful, the call returns:
- `access_token` - use to access the EDB Cloud API. See [Access Tokens](https://auth0.com/docs/tokens/access-tokens) for more information.

- `refresh_token` - use to obtain a new access token or ID token after the previous one has expired. (See [Refresh Tokens](https://auth0.com/docs/tokens/refresh-tokens) for more information.) Refresh tokens expire after 30 days.

- `expires_in` - means the token expires after 24 hours since its creation.

For example:
```
{
"access_token": "eyJhbGc.......1Qtkaw2fyho",
"id_token": "eyJhbGci.......FBra7tA",
"refresh_token": "v1.MTvuZpu.......sbiionEhtTw",
"scope": "openid profile email offline_access",
"expires_in": 86400,
"token_type": "Bearer"
}
```
Store the access_token and refresh_token in environment variables for future use. For example,

```
ACCESS_TOKEN="eyJhbGc.......1Qtkaw2fyho"
REFRESH_TOKEN="v1.MTvuZpu.......sbiionEhtTw"
```

If not successful, you receive one of the following errors:
- `authorization_pending` - continue polling using the suggested interval retrieved when you [requested the device code](#request-the-device-code).

- `slow_down` - slow down and use the suggested interval retrieved when you [requested the device code](#request-the-device-code). To avoid receiving this error due to network latency, you should start counting each interval after receipt of the last polling request's response.
- `expired_token` - you have not authorized the device quickly enough, so the `device_code` has expired. Your application should notify you that it has expired and to restore it.
- `access_denied`

!!! Tip
Contact [Customer Support](../overview/06_support) if you have trouble obtaining a valid access token to access EDB Cloud API.
!!!

## Calling the API

To call the EDB Cloud API, your application must pass the retrieved access token as a bearer token in the Authorization header of your HTTP request. For example:

```
curl --request GET \
--url "$AUDIENCE/v1/postgres-types" \
--header "authorization: Bearer $ACCESS_TOKEN" \
--header "content-type: application/json"
```

Example response:
```
{
"pgTypesList": [
{
"id": "epas",
"name": "EDB Postgres Advanced Server",
"description": "",
"dockerImage": ""
},
{
"id": "postgres",
"name": "PostgreSQL",
"description": "",
"dockerImage": ""
}
]
}
```


## Refreshing your Token

You can use the refresh token to get a new access token. Usually you need a new access token only after the previous one expires or when gaining access to a new resource for the first time. You shouldn't call the endpoint to get a new access token every time you call an API. There are rate limits that throttle the amount of requests to the endpoint that can be executed using the same token from the same IP.

To refresh your token, make a POST request to the `/oauth/token` endpoint in the Authentication API, using `grant_type=refresh_token`. For example:
```
curl --request POST \
--url "$ISSUER_URL/oauth/token" \
--header "content-type: application/x-www-form-urlencoded" \
--data "grant_type=refresh_token" \
--data "client_id=$CLIENT_ID" \
--data "refresh_token=$REFRESH_TOKEN"
```
The `refresh_token` is in the response when you [requested the token](#request-the-device-code).

The `client_id` is always the same one in the response when you [queried the authentication endpoint](#query-the-authentication-endpoint).

The response of this API call includes the `access_token`. For example:
```
{
"access_token": "eyJ...MoQ",
"expires_in": 86400,
"scope": "openid offline_access",
"id_token": "eyJ...0NE",
"refresh_token": "v1.Mjv..._2pRs",
"token_type": "Bearer"
}
```

!!! Note
You need to save the `refresh_token` retrieved from this response for the next refresh call. The `refresh_token` in the response when you originally [requested the token](#request-the-token) is obsoleted once it has been used.










2 changes: 1 addition & 1 deletion product_docs/docs/efm/4/efm_quick_start/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The `<cluster_name>.nodes` file (efm.nodes file in this example) is read at star

`1.2.3.6:7800`

Please note that the Failover Manager agent will not verify the content of the `efm.nodes` file; the agent expects that some of the addresses in the file cannot be reached (e.g. that another agent hasn’t been started yet).
Please note that the Failover Manager agent will not validate the addresses in the `efm.nodes` file; the agent expects that some of the addresses in the file cannot be reached (e.g. that another agent hasn’t been started yet).

**Step 5: Configure the Other Nodes**

Expand Down
10 changes: 10 additions & 0 deletions product_docs/docs/odbc_connector/13.1.0.1/01_whats_new.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "What’s New"

---


The following feature is added to create the EDB ODBC Connector `13.01.0000.01`:

Merged with the upstream community driver version 13.01.0000.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "Requirements Overview"

---

## Supported Versions

The EDB ODBC Connector is certified with Advanced Server version 9.6 and above.

## Supported Platforms

The EDB ODBC Connector native packages are supported on the following platforms:

64 bit Linux:

- Red Hat Enterprise Linux (x86_64) 8.x and 7.x
- CentOS (x86_64) 8.x and 7.x
- OL Linux 8.x and 7.x
- PPC-LE 8 running RHEL or CentOS 7.x
- SLES 12.x
- Debian 10.x and 9.x
- Ubuntu 20.04 and 18.04 LTS

The EDB ODBC Connector graphical installers are supported on the following Windows platforms:

64-bit Windows:

- Windows Server 2019
- Windows Server 2016
- Windows Server 2012 R2
- Windows 10
- Windows 8.1

32-bit Windows:

- Windows 10
- Windows 8.1
Loading

0 comments on commit 8605720

Please sign in to comment.