Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add custom styles for wider tables #3007

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Rafiki's [auth service](/integration/services/auth-service) provides you with a

The following `backend` variables must be configured on your authorization server.

<div class="overflow-table wide-column">

| Variable | Helm value name | Default | Description | Required |
| ------------------------------ | ---------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `IDENTITY_SERVER_URL` | `auth.identityServer.domain` | N/A | Your IdP server's URL where your authorization server will direct clients to so end-users can complete the interaction and authorize a grant. | Y |
Expand All @@ -49,6 +51,8 @@ The following `backend` variables must be configured on your authorization serve
| `INTROSPECTION_PORT` | `auth.port.introspection` | `3007` | The port number of your Open Payments authorization token introspection server | Y |
| `LIST_ALL_ACCESS_INTERACTION` | N/A | `true` | Specifies whether grant requests including a `list-all` action should require interaction. In these requests, the client asks to list resources that they themselves did not create. | Y |

</div>

## Interaction endpoints

Your Open Payments authorization server extends an API for your IdP server to use after a pending grant request is created.
Expand Down Expand Up @@ -93,12 +97,16 @@ The `result` query parameter will indicate the success or failure of the grant a

The following table lists examples of the possible response types on this endpoint.

<div class="overflow-table">

| Response | Description | Example |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Rejected | The interaction was rejected by the end-user. | `?result=grant_rejected` |
| Invalid | The grant was not in a state where it could be accepted or rejected (e.g., grant was already approved) | `?result=grant_invalid` |
| Success | The grant was successful with the following returned in the response:<br /><ul><li>A hash representing the SHA-256 hash of values provided by the client in the <LinkOut href="https://openpayments.dev/apis/auth-server/operations/post-request/">grant initialization request</LinkOut> (`interact.finish.nonce`), and the values in the response returned from your authorization server (`interact.finish`).</li><li>The `interact_ref` that identifies the interaction on your authorization server alongside the hash</li><li>The URI of the grant initialization request (e.g., `https://www.auth-server.com`)</li></ul> | `hash=p28jsq0Y2KK3WS__a42tavNC64ldGTBroywsWxT4md_jZQ1R\HZT8BOWYHcLmObM7XHPAdJzTZMtKBsaraJ64A &interact_ref=4IFWWIKYBC2PQ6U56NL1` |

</div>

#### Continue grant

The client requests a grant from your authorization server for an accepted interaction. Your authorization server responds with an <LinkOut href="https://openpayments.dev/apis/auth-server/operations/post-continue/">access token</LinkOut>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ If an ASE does not provide the necessary exchange rate for a transaction, the te

Rafiki has the following metrics. All data points (counter increases) are exported to collection endpoints at a configurable interval. The default interval is 15 seconds.

<div class="overflow-table wide-column">

| Metric | Type | Description | Behavior |
| ------------------------- | --------- | ------------------------------------------ | ------------------------------------------------------------------------------ |
| `transactions_total` | Counter | Count of funded outgoing transactions | Increases by 1 for each successfully funded outgoing payment resource |
Expand All @@ -82,6 +84,8 @@ Rafiki has the following metrics. All data points (counter increases) are export
| `transaction_fee_amounts` | Counter | Fee amount sent through network | Increases by the amount sent minus the amount received for an outgoing payment |
| `ilp_pay_time_ms` | Histogram | Time to complete an ILP payment | Records the time taken to make an ILP payment |

</div>

The current implementation only collects metrics on the SENDING side of a transaction. Metrics for external Open Payments transactions RECEIVED by a Rafiki instance in the network are not collected.

## Privacy
Expand Down Expand Up @@ -120,6 +124,8 @@ Another factor that obscures sensitive data is currency conversion. In cross-cur

The following table shows the values in the algorithm when running transactions for different amounts. The raw value increases as you move down the rows of the table. All values are in scale 4.

<div class="overflow-table">

| Raw value | Bucket size | Rounded value | Privacy parameter | Laplace noise | Final value |
| --------- | ----------- | ------------- | ----------------- | ------------- | ----------- |
| 8300 | 10000 | 10000 | 1000 | 2037 | 12037 |
Expand All @@ -131,6 +137,8 @@ The following table shows the values in the algorithm when running transactions
| 112400400 | 10000000 | 100000000 | 1000000 | 407847 | 100407847 |
| 222290500 | 10000000 | 100000000 | 1000000 | -686149 | 99313851 |

</div>

### References

Rafiki’s telemetry solution is a combination of techniques described in various white papers on privacy-preserving data collection. More information can be found in the following papers:
Expand All @@ -153,6 +161,8 @@ You must deploy your own OTEL Collector that acts as a sidecar container to Rafi

### Telemetry environment variables

<div class="overflow-table wider-160-table">

| Variable name | Type | Description | Required |
| -------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `ENABLE_TELEMETRY` | Boolean | Enables the telemetry service on Rafiki. Defaults to `true`. | N |
Expand All @@ -161,6 +171,8 @@ You must deploy your own OTEL Collector that acts as a sidecar container to Rafi
| `OPEN_TELEMETRY_EXPORT_INTERVAL` | Number | Indicates, in milliseconds, how often the instrumented Rafiki instance should send metrics. Defaults to `15000`. | N |
| `TELEMETRY_EXCHANGE_RATES_URL` | String | <p>Defines the endpoint Rafiki will query for exchange rates. Used as a fallback if/when [exchange rates](/integration/requirements/exchange-rates) aren’t provided.</p><p>When set, the response format of the external exchange rates API should be of type `rates`, as is expected by the rate service.</p><p>Defaults to `https://telemetry-exchange-rates.s3.amazonaws.com/exchange-rates-usd.json`, which points to a public S3 that has the previously mentioned required format, updated daily.</p> | N |

</div>

### Example Docker OTEL Collector image and configuration

Below is an example of a Docker OTEL Collector image and configuration that integrates with Rafiki and sends data to a Prometheus remote write endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ Environment variables are key value pairs that are used to configure how your Ra
Each environment variable name is uppercase, followed by an equal sign and the value of the variable.

<CodeBlock title='Environment variable example'>
```

```
WEBHOOKS_URL=http://my-business/webhooks

```

</CodeBlock>
Expand All @@ -38,4 +37,3 @@ To run Rafiki you must set the environment variables for the `backend`, `auth` a
## Frontend

<FrontEnv />
```
4 changes: 4 additions & 0 deletions packages/documentation/src/partials/auth-variables.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { LinkOut } from '@interledger/docs-design-system'

<div class="overflow-table wider-column">

| Variable | Helm Value Name | Default | Description |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ACCESS_TOKEN_DELETION_DAYS` | auth.accessToken.deletionDays | `30` | days until expired or revoked access tokens are deleted |
Expand Down Expand Up @@ -27,3 +29,5 @@ import { LinkOut } from '@interledger/docs-design-system'
| `TRUST_PROXY` | | `false` | flag to use X-Forwarded-Proto header to determine if connections is secure |
| `WAIT_SECONDS` | auth.grant.waitSeconds | `5` | wait time included in grant request response (`grant.continue`) |
| `ENABLE_MANUAL_MIGRATIONS` | auth.enableManualMigrations | `false` | When set to true, user needs to run database manually with command `npm run knex -- migrate:latest --env production` |

</div>
4 changes: 4 additions & 0 deletions packages/documentation/src/partials/backend-variables.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { LinkOut } from '@interledger/docs-design-system'

<div class="overflow-table wider-column">

| Variable | Helm Value Name | Default | Description |
| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ADMIN_PORT` | backend.port.admin | `3001` | Admin API GraphQL Server port |
Expand Down Expand Up @@ -54,3 +56,5 @@ import { LinkOut } from '@interledger/docs-design-system'
| `WEBHOOK_WORKER_IDLE` | backend.workerIdle | `200` | time in milliseconds that WEBHOOK_WORKERS will wait until they check an empty webhook event queue again |
| `WITHDRAWAL_THROTTLE_DELAY` | backend.withdrawalThrottleDelay | `undefined` | delay in liquidity withdrawal processing |
| `ENABLE_MANUAL_MIGRATIONS` | backend.enableManualMigrations | `false` | When set to true, user needs to run database manually with command `npm run knex -- migrate:latest --env production` |

</div>
Loading
Loading