Skip to content
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

App built with golang sdk in windows throws an private key error with Identities enrolled in Windows by ZET #489

Closed
dariuszSki opened this issue Sep 19, 2022 · 3 comments
Labels
bug Something isn't working Windows

Comments

@dariuszSki
Copy link
Contributor

An app that is compiled with the ziti golang sdk fails to run if the identity is enrolled using ziti-edge-tunnel windows binary.

PS grpc-echo>.\grpc-echo.exe client --service grpcService --config  $HOME\NetFoundry\grpc_client_wde.json --clientEchoString check123
2022/09/19 08:25:10 failed to authenticate: failed to initialize context: (open -----BEGIN EC PRIVATE KEY-----
MHcCAQEEIBGQHizHR0K8zYXoCMUxhaZUmxmTuoj09i8QxNcCrKF9oAoGCCqGSM49
AwEHoUQDQgAEtVLCPFLDM0tP4oqn4TqN+KfMfxskVI9ad5Rc8FoLWdMMx5O/39s7
IhGos4Nx6myA46v72A3T/aF+j7NPaQ0aVg==
-----END EC PRIVATE KEY-----
: The filename, directory name, or volume label syntax is incorrect.)
PS grpc-echo>

Here is the output with identity enrolled with ziti-tunnel (go)

PS grpc-echo>.\grpc-echo.exe client --service grpcService --config  $HOME\NetFoundry\dariusz_test01.json --clientEchoString check123
2022/09/19 08:24:44 Message: grpcService grpc_server_atlanta check123
PS grpc-echo>

Steps to reproduce it:

Enrollment step
ziti-tunnel

PS NetFoundry>C:\Bin\ziti-windows-amd64-0.26.7\ziti\ziti-tunnel.exe enroll -j .\dariusz_test01.jwt -i .\dariusz_test01.json
INFO    generating 4096 bit RSA key
INFO    enrolled successfully. identity file written to: .\dariusz_test01.json
PS NetFoundry>

ziti-edge-tunnel

PS NetFoundry>C:\Bin\ziti-edge-tunnel.exe enroll -j .\grpc_client_wde.jwt -i .\grpc_client_wde.json
StartServiceCtrlDispatcher failed (1063)
PS NetFoundry>
@dovholuknf dovholuknf added bug Something isn't working Windows labels Sep 19, 2022
@dovholuknf
Copy link
Member

I am not 100% sure that i can quite follow what you are trying to do... let me see if i can distill these into the steps.

  1. create an identity
  2. enroll the identity using ziti-edge-tunnel
  3. use the identity in an app using the golang sdk
  4. observe the golang sdk fails

If that's the case - then it's this bug from the golang sdk, and I'll close this bug if that's the case: openziti/sdk-golang#242

@dariuszSki
Copy link
Contributor Author

Yes, that is what I am trying to do.

@dovholuknf
Copy link
Member

duplicates openziti/sdk-golang#242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Windows
Projects
None yet
Development

No branches or pull requests

2 participants