-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
231 changed files
with
6,264 additions
and
3,760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Site Admins | ||
|
||
Site admins possesses supreme privileges to an OTF installation. There are two ways to assume the role: | ||
|
||
* Promote users to the role using the [`--site-admins`](../../config/flags/#-site-admins) flag. | ||
* Set a token with the [`--site-token`](../../config/flags/#-site-token) flag and use it to login as the built-in `site-admin` user | ||
|
||
## Promoting users | ||
|
||
To promote users to the role, simply set the [`--site-admins`](../../config/flags/#-site-admins) flag. There is no need to re-login. | ||
|
||
## Site token | ||
|
||
Set a site token with the [`--site-token`](../../config/flags/#-site-token) flag. You can use the token with the API, CLI, and the web UI. | ||
|
||
To use it to login to the web UI, use the link in the bottom right corner of the login page: | ||
|
||
![login page](../images/no_authenticators_site_admin_login.png){.screenshot} | ||
![site admin enter token](../images/site_admin_login_enter_token.png){.screenshot} | ||
![site admin profile](../images/site_admin_profile.png){.screenshot} | ||
|
||
!!! note | ||
Keep the token secure. Anyone with access to the token has complete access to OTF. Use of the site admin token is recommended only for one-off administrative and testing purposes. You should use an Identity Provider in most cases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,8 +191,7 @@ comma. For example: | |
otfd --site-admins [email protected],[email protected] | ||
``` | ||
|
||
Any users that were previously promoted and are no longer specified with this | ||
flag are demoted. | ||
Users are automatically created if they don't exist already. | ||
|
||
## `--site-token` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Github app | ||
|
||
OTF provides the ability to create a [Github app](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps). The app can then be used as an alternative to a personal access token for a VCS provider, offering the following advantages: | ||
|
||
* Unlike a personal token, an app is [not necessarily tied to an individual's personal Github account](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/deciding-when-to-build-a-github-app#choosing-between-a-github-app-or-a-personal-access-token). Instead it can be owned and installed into a Github organization. If an individual leaves an organization then the app continues to function. | ||
* The app can be installed into more than Github account. For instance, if you install the app into Github organizations `dev` and `prod` you can then create VCS providers for those installations respectively, restricting their access to the repositories belonging to each organization. | ||
* An app comes with [its own webhook](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/deciding-when-to-build-a-github-app#github-apps-have-built-in-webhooks). Therefore, unlike with personal tokens, OTF does not need to create webhooks on Github repositories. This can be advantage if you want to overcome the maximum 20 webhook per-repo limit (OTF creates a separate webhook on a repo for each VCS provider if using a personal token). | ||
* An app has a higher [maximum possible rate-limit](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/rate-limits-for-github-apps). | ||
* The github app creation process automatically persists the app credentials to the database. There is no copying-and-pasting of credentials involved. | ||
|
||
!!! note | ||
Github apps also have access to a richer API for status checks. A future version of OTF will take advantage of this. | ||
|
||
## Create the app | ||
|
||
Select **site** in the top right corner menu to take you to the site settings page: | ||
|
||
![site settings page](images/site_settings.png){.screenshot} | ||
|
||
Select **GitHub app**. You are then prompted to create an app: | ||
|
||
![github app page](images/empty_github_app_page.png){.screenshot} | ||
|
||
Select the link to create a new app. You are presented with a form to create the app: | ||
|
||
![new github app form](images/new_github_app.png){.screenshot} | ||
|
||
An app has an owner. By default your github personal account is the owner. If you would prefer a Github organization to own the application then enter the name of the organization. | ||
|
||
An app is *private* by default. That means the app can only be installed into the Github account that owns the app, and only repositories in that account will be accessible to OTF. If you want to install the app into more than one Github account then you need to select the **Public** checkbox. (This can be changed once the app has been created, via the app settings page on Github). | ||
|
||
Click **Create** and you are redirected to Github. You are given the opportunity to set a name (it must be globally unique and cannot match the name of a Github account): | ||
|
||
![create github app on github.com](images/github_create_github_app.png){.screenshot} | ||
|
||
Click the **Create GitHub App for ...** button. | ||
|
||
You're then redirected back to OTF, where details of the app are now visible: | ||
|
||
![github app created](images/github_app_created.png){.screenshot} | ||
|
||
## Install the app | ||
|
||
Once you've created the app you need to install it. | ||
|
||
On the Github app page, click the **Install** button: | ||
|
||
![github app created](images/github_app_created.png){.screenshot} | ||
|
||
You are re-directed to Github, where you can select the repositories that are to be made accessible to OTF: | ||
|
||
![github app created](images/github_install_app.png){.screenshot} | ||
|
||
!!! note | ||
If you created a *public* app earlier you will first be presented with a choice of accounts to install the app into. | ||
|
||
Click the **Install** button and you'll be re-directed back to OTF. The installation should now be listed: | ||
|
||
![github app installation listing](images/github_app_install_list.png){.screenshot} | ||
|
||
You can create a [VCS provider](vcs_providers.md) from the installation. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"id": 384952, | ||
"slug": "otf-new", | ||
"node_id": "A_kwHOAc1xa84ABd-4", | ||
"owner": { | ||
"login": "automatize", | ||
"id": 30241131, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjMwMjQxMTMx", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/30241131?v=4", | ||
"html_url": "https://github.com/automatize", | ||
"gravatar_id": "", | ||
"type": "Organization", | ||
"site_admin": false, | ||
"url": "https://api.github.com/users/automatize", | ||
"events_url": "https://api.github.com/users/automatize/events{/privacy}", | ||
"following_url": "https://api.github.com/users/automatize/following{/other_user}", | ||
"followers_url": "https://api.github.com/users/automatize/followers", | ||
"gists_url": "https://api.github.com/users/automatize/gists{/gist_id}", | ||
"organizations_url": "https://api.github.com/users/automatize/orgs", | ||
"received_events_url": "https://api.github.com/users/automatize/received_events", | ||
"repos_url": "https://api.github.com/users/automatize/repos", | ||
"starred_url": "https://api.github.com/users/automatize/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/automatize/subscriptions" | ||
}, | ||
"name": "OTF-new", | ||
"description": "Trigger terraform runs in OTF from GitHub", | ||
"external_url": "https://otf.fridayafternoonhangover.com", | ||
"html_url": "https://github.com/apps/otf-new", | ||
"created_at": "2023-09-03T16:10:38Z", | ||
"updated_at": "2023-09-03T16:10:38Z", | ||
"client_id": "Iv1.f3fefdd17666291b", | ||
"client_secret": "fb14b7b11460196307e08f9b756a28091203f8f9", | ||
"webhook_secret": "8a1963079437b7c38744d67931d7f2fc54e7e63d", | ||
"pem": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEA5Rfz3Utrsw9EycKthYLEt5KNA+9FphNCxklDzy3/KKAlAgu6\ns+SGyWM8mLn1GPYR7yfFZpww7uNh2Ya64YzM9ZTnS0Q80GqMtamCf11owxBS9d4q\nHYsxrFiIDu0fjxnMYeY8gbMkhG7Mr0cWwUsyleb091KWq9Rslcu/pZiKgpOdDnNB\nw7tNxzMYSOWkf/cRHnJ/KoYURdL0sUkqEflc/9XHuAZas3WaZOqjUzSKbVQU18KJ\nkcq/pmoWVsU4DjoyVt1uqPFNMclUBBui20Sng7EAtsB80xh4geDWN/F1EeqkFam3\ny9ycTP8A0A0zFBqXyWgjnEtjM6YntODNxtKV7QIDAQABAoIBAFgWKKdLK6MS2OE3\nIJ84U8k96Ui9BKvBtigl3ZPY3MZTJUevGN+4m/btWExlHA+39ddeFHHK1qnT9ji8\nrDizec9nrLNtDnEYtvfWsJ2mXfS63xs4jDsF3VimRdJvbHYKdmKiM1uvdPgS3lL6\n4435Cv9GaaR7NgHl0MacLBlRGNjxjOWwtTEd+mgVwzq5lCxxDY7+MBNvHbMZscdZ\nxxcpL1hg2K/7WKHz4CaVOnMiWORN8N8yVZ0mdRE4GtFNRsj13sGSpjYhwDOxGT5a\n1dZzuxee5/KrOMTIUU3qBG3yxfJ87eFyuMqdD+MFYoEgiOh7C671aquchtgTbjys\nZi53RoUCgYEA9/uEJQc2pVTPR2rp0Tm+mWUsST0UcXzK2NmR0Tf+vOHtrgovhPqU\nuxALWUQiBBzcwMx5crtCCZwEGwDGJlMUVSqUWWAFd4lCfSOxm7JUCelNS67Pykny\nuOhaoUqjZ8UaDcC4pDdepRQ4ggGyAYtwN92eW8mFOYHI121dk4QV37sCgYEA7IAZ\nEhdma0nIOb68dCJBQ/Zk6S3Z0QHTz46n/f0jEFbLvD9MHaVTuwIKfE/7KyZZGmO9\nLfcnfwMKmZnWjcLxhuhEFkhc5Gelvn12oizbBZ5uziir1ZhIn7U0YbA/Fq83qHZH\nIc9BBBexySKgNttpgcgJhdG0kqHsCoksvo3mYncCgYEA9zTwgskyHJbzG0rlVAGw\nk9Jb15bgLlItFQevaVXcyAahngHhZTs30VMpPQ/CqT7sgfZUi59JMbMqFJEs9z+S\n4WPVB1PFn2hhs8ZFY+TeChNdTrkxw4L8SIC4+FkjlGrUkikw5+Oaog4KVu/Bt/B9\nKfPvzaiS+sT6pmcMBeaCt8kCgYAD55GCZPSB7PPrUCTYXgBp2NWNq/4en0MZ+Cb5\n4IYFrQksEHd3PdWGDuCRcNiau8VY1DC5Y405YZl5M7sBGCjYq1kEbSlrc/KelH+y\n6b6r9xOpP66mlh8M0/cLbdd8zmPC2kEOY9eU87cxtOqkPTcet2jA1td+XEIDYoRk\nmP8mvQKBgQDJ0mx6pReYxZTxUDYQK0Nhl190QNFX9WdwxWQdcn3/ihV+8Im8Og/B\n2+WLZSnVgp9Lq6qMXtA9+pVINrzNIeGyr+JVzWlulySoqcf7gV8pzPH2kSTyJJDb\nXiAMJvx9DcMvSCCjjJvkWWheSjXTNXH9eqHNRY2/A7LyxWA3xnDP0w==\n-----END RSA PRIVATE KEY-----\n" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.