Skip to content

[v12] Integrations: web API and tctl (#24145)#24458

Merged
marcoandredinis merged 1 commit intobranch/v12from
marco/v12/backport_24145
Apr 13, 2023
Merged

[v12] Integrations: web API and tctl (#24145)#24458
marcoandredinis merged 1 commit intobranch/v12from
marco/v12/backport_24145

Conversation

@marcoandredinis
Copy link
Copy Markdown
Contributor

Backport of #24145

@github-actions github-actions Bot added backport size/lg tctl tctl - Teleport admin tool labels Apr 12, 2023
@github-actions github-actions Bot requested review from kimlisa, r0mant and zmb3 April 12, 2023 17:09
@marcoandredinis marcoandredinis changed the title Integrations: web API and tctl (#24145) [v12] Integrations: web API and tctl (#24145) Apr 12, 2023
@marcoandredinis marcoandredinis force-pushed the marco/v12/backport_24145 branch from b245288 to 308deab Compare April 13, 2023 07:43
* Integrations: web api and tclt

This PR adds end user interface to manage integrations:

`tctl`
```
$ tctl get integrations --config teleport.yaml --format text
Name        Type     Spec
----------- -------- ----------------------------------------------
myawsint    aws-oidc RoleARN=arn:aws:iam::123456789012:role/DevTeam
mynewawsint aws-oidc RoleARN=arn:aws:iam::123456789012:role/OpsTeam
```

HTTP API
```
$ curl 'https://127.0.0.1.nip.io:3080/v1/webapi/sites/lenix/integrations'

{
  "items": [
    {
      "name": "myawsint",
      "subKind": "aws-oidc",
      "awsOIDC": {
        "roleARN": "arn:aws:iam::123456789012:role/DevTeam"
      }
    },
    {
      "name": "mynewawsint",
      "subKind": "aws-oidc",
      "awsOIDC": {
        "roleARN": "arn:aws:iam::123456789012:role/OpsTeam"
      }
    }
  ],
  "nextKey": ""
}
```

* Add explicit type

* add awsoidc role arn setter

* change serializer

* ignore bodyclose linter false positive

* check for error before reading

* simplify webPack.DoRequest call

* fix godoc of WebClientPack.DoRequest

* return body and status code only
@marcoandredinis marcoandredinis force-pushed the marco/v12/backport_24145 branch from 308deab to e1714e8 Compare April 13, 2023 14:53
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from kimlisa April 13, 2023 15:22
@marcoandredinis marcoandredinis added this pull request to the merge queue Apr 13, 2023
Merged via the queue into branch/v12 with commit 7647d33 Apr 13, 2023
@marcoandredinis marcoandredinis deleted the marco/v12/backport_24145 branch April 13, 2023 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport size/lg tctl tctl - Teleport admin tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants