-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DynamicIdentityFileCreds being incompatible with L7 Loadbalancers #36411
Merged
strideynet
merged 5 commits into
master
from
strideynet/dyanmic-identity-creds-support-alpn-upgrade
Jan 9, 2024
Merged
Fix DynamicIdentityFileCreds being incompatible with L7 Loadbalancers #36411
strideynet
merged 5 commits into
master
from
strideynet/dyanmic-identity-creds-support-alpn-upgrade
Jan 9, 2024
Conversation
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
greedy52
approved these changes
Jan 8, 2024
Tested locally with package main
import (
"context"
glog "log"
"os"
"os/signal"
"github.com/sirupsen/logrus"
"github.com/gravitational/teleport/api/client"
apidefaults "github.com/gravitational/teleport/api/defaults"
"github.com/gravitational/trace"
)
func main() {
err := run()
glog.Fatal(err)
}
func run() error {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
defer cancel()
log := logrus.StandardLogger()
logrus.SetLevel(logrus.DebugLevel)
log.SetLevel(logrus.DebugLevel)
creds, err := client.NewDynamicIdentityFileCreds("./admin_identity")
if err != nil {
return trace.Wrap(err, "loading creds")
}
teleportClient, err := client.New(ctx, client.Config{
Addrs: []string{"leaf.tele.ottr.sh:443"},
Credentials: []client.Credentials{creds},
})
if err != nil {
return trace.Wrap(err, "connecting")
}
defer teleportClient.Close()
nodes, err := teleportClient.GetNodes(ctx, apidefaults.Namespace)
if err != nil {
return trace.Wrap(err, "get nodes")
}
log.Infof("Nodes: %d", len(nodes))
return nil
} And Caddy configured as an L7 LB. |
codingllama
approved these changes
Jan 9, 2024
codingllama
approved these changes
Jan 9, 2024
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Jan 9, 2024
strideynet
deleted the
strideynet/dyanmic-identity-creds-support-alpn-upgrade
branch
January 9, 2024 19:19
@strideynet See the table below for backport results.
|
This was referenced Jan 9, 2024
ibeckermayer
pushed a commit
that referenced
this pull request
Jan 17, 2024
…#36411) * DynamicIdentityFileCreds should correctly provide TLS root CAs to ALPN handshake * Fix bug involving multiple credentials * Add test case covering CA Cert Pool * Update api/client/credentials_test.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> --------- Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #36229
changelog: Fixes
refresh_identity = true
preventing Access Plugins connecting to Teleport using TLS routing with a L7 LB.