-
Notifications
You must be signed in to change notification settings - Fork 19
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
MANTA_NO_AUTH=1 environment variable is not honored #35
Comments
Thanks Elijah. Sounds like I can patch this relatively easy since this is just a shut off valve around our inclusion of HTTP signature authentication to outgoing requests. /cc @misterbisson |
I have a bug fix in the works but I'm hitting an issue with |
Ref: TritonDataCenter#35 This adds support for turning off Joyent's SSH based HTTP signature authentication when running within a Manta zone. The Manta zone detection utilizes a known Manta image feature which injects an environment variable called `MANTA_NO_AUTH`. The only other present requirement I've found for running `triton-go` within Manta is to make sure root TLS certificates are installed on the SmartOS system at `/etc/ssl/certs/ca-certificates.crt`.
Is there a way to disable the who crypto module entirely if you are running with |
I killed the open PR because there are a couple small details I missed the first go.
I should note that I feel like the Go SDK should not utilize default environment variables to self configure the clients. How those values arrive when configuring a client is up to the consumer and we don't enforce any naming conventions like With all of that said, here's an example I'm working with... package main
import (
"context"
"fmt"
"log"
"os"
triton "github.com/joyent/triton-go"
"github.com/joyent/triton-go/storage"
)
func main() {
mantaUser, foundUser := os.LookupEnv("MANTA_USER")
if !foundUser {
log.Fatal("Couldn't find \"MANTA_USER\" in your environment")
}
mantaURL, foundURL := os.LookupEnv("MANTA_URL")
if !foundURL {
log.Fatal("Couldn't find \"MANTA_URL\" in your environment")
}
s, err := storage.NewClient(&triton.ClientConfig{
MantaURL: mantaURL,
AccountName: mantaUser,
})
if err != nil {
log.Fatalf("could not init client: %s", err)
}
// NOTE: I'll try to also remove this step.
s.Client.InsecureSkipTLSVerify()
ctx := context.Background()
list, err := s.Dir().List(ctx, &storage.ListDirectoryInput{
DirectoryName: "/stor",
})
if err != nil {
log.Fatalf("cannot list storage entries: %s", err)
}
for _, entry := range list.Entries {
fmt.Println(entry.Name)
}
} |
@stack72 This is another Manta related issue that was half completed and I never got back to due to priorities. I'm positive it's worth the effort and would be beneficial for learning Manta jobs/zones. It's the ability to run |
When running within a Manta zone,
MANTA_NO_AUTH=1
is set. This allows for an application to connect to Manta using the running account without doing HTTP signature authentication.You can't run golang apps directly in Manta zones / jobs becausetriton-go doesn't disable HTTP signatures when this environment variable is present and enabled.
The text was updated successfully, but these errors were encountered: