feat: support multiple credential holders on GlobalDNS and VPN#2394
feat: support multiple credential holders on GlobalDNS and VPN#2394cb-github-robot merged 2 commits intocloud-barista:mainfrom
Conversation
- Upgrade mc-terrarium to v0.1.4 - Enable multiple credential holders in GlobalDNS and VPN - Fetch AWS credentials dynamically via OpenBao holder paths - Align 'x-credential-holder' header in REST and core modules - Add mc-terrarium script in init/ for OpenBao credential registration
|
Since changing the credential format, registering IBM and GCP credentials fails during |
|
Let me check. :) |
|
|
Both OpenBao and CB-SP credentials for IBM/GCP works for me. |
|
Registering credentials on OpenBao is working well for me as well. But.. registering those on Spider failed with I left the S3-related keys blank; would that be an issue? |
|
yes it might be an issue I guess. why don't you/we commented the keys with empty value in the credentials.yaml ? |
|
I’m currently performing batch tests (Create, Get, and Delete) for VPNs on aws-to-tencent and aws-to-azure. After the test, I will try your comment :) |
|
In the meantime, I have two questions:
I've changed
I've applied context propagation throughout GlobalDNS and VPN (from the Tumblebug API user input to the Terrarium API call). It appears to me that many other APIs do not yet use this pattern, so I would appreciate it if you could review whether this approach aligns with what you explained offline. |
|
The test has passed. I'm switching the PR status to 'Ready for review'. |
@yunkon-kim could you let me know |
|
It appeared that the context was not being passed to the core function in about 5 handlers checked randomly. :) For example, I imagined the following parameter passing by the offline discussion. // @Failure 500 {object} model.SimpleMsg
// @Router /resources/globalDns/hostedZone [get]
func RestGetHostedZones(c echo.Context) error {
log.Debug().Msg("[DNS-REST] GET /resources/globalDns/hostedZone called")
resp, err := resource.ListHostedZones(c.Request().Context()) <<<==== Passing context like this
if err != nil {
log.Error().Err(err).Msg("[DNS-REST] ListHostedZones failed")
return c.JSON(classifyDnsError(err), model.SimpleMsg{Message: err.Error()})
}
log.Debug().Int("count", len(resp.HostedZones)).Msg("[DNS-REST] ListHostedZones succeeded")
return c.JSON(http.StatusOK, resp)
} |
|
@yunkon-kim I expected this PR to add the context to all relevant APIs for GlobalDns and VPN. :) |
- Update GlobalDns and VPN handlers to use 'ctx := c.Request().Context()' pattern and passing 'ctx' to core functions - Update Swagger annotations for 'x-request-id' and 'x-credential-holder' - Regenerate Swagger docs
|
/approve |


ref) cloud-barista/mc-terrarium#205