gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.61k stars 1.76k forks source link

Cannot set RDS proxy for SQL Server as static databases #38308

Open greedy52 opened 9 months ago

greedy52 commented 9 months ago

Expected behavior:

db_service:
  enabled: true
  databases:
  - name: "sample-rdsproxy-mssql"
    uri: "my-proxy.proxy-abcdefghijklmnop.us-west-1.rds.amazonaws.com:1433"
    protocol: "sqlserver"

Service should start

Current behavior:

ERROR REPORT:                                                                                                           
Original Error: *trace.BadParameterError missing keytab file path or kdc_host_name for database "sample-rdsproxy-mssql"             
Stack Trace:
    github.com/gravitational/teleport/lib/service/servicecfg/database.go:346 github.com/gravitational/teleport/lib/service/servicecfg.(*DatabaseAD).CheckAndSetDefaults
    github.com/gravitational/teleport/lib/service/servicecfg/database.go:128 github.com/gravitational/teleport/lib/service/servicecfg.(*Database).CheckAndSetDefaults
    github.com/gravitational/teleport/lib/config/configuration.go:1799 github.com/gravitational/teleport/lib/config.applyDatabasesConfig
    github.com/gravitational/teleport/lib/config/configuration.go:546 github.com/gravitational/teleport/lib/config.ApplyFileConfig
    github.com/gravitational/teleport/lib/config/configuration.go:2382 github.com/gravitational/teleport/lib/config.Configure
    github.com/gravitational/teleport/tool/teleport/common/teleport.go:544 github.com/gravitational/teleport/tool/teleport/common.Run         

Bug details:

RDS Proxy should be exempted from this: https://github.com/gravitational/teleport/blob/3701a0f5ace68731f4a004334eed06aa1cf60cd2/lib/service/servicecfg/database.go#L126-L131

greedy52 commented 9 months ago

Workarounds, please use auto-discovery or dynamic resources.