teleport/integration/integrations
Marco André Dinis e0d6c1de49
Integrations: web API and tctl (#24145)
* 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
2023-04-12 16:06:30 +00:00
..
integration_test.go Integrations: web API and tctl (#24145) 2023-04-12 16:06:30 +00:00