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

IoT Edge Module - Missing Connection String for Module #7

Closed
MPapst opened this issue Jul 3, 2018 · 2 comments
Closed

IoT Edge Module - Missing Connection String for Module #7

MPapst opened this issue Jul 3, 2018 · 2 comments

Comments

@MPapst
Copy link

MPapst commented Jul 3, 2018

Expected Behavior

Connection String or relevant Tokens are injected into Module via Env var

Current Behavior

At least the SAS Token is not injected into the module.

Steps to Reproduce

  1. Create a sample Module (e.g. using VSCoce Extension)
  2. Build Container and deploy to edge device
  3. Find env vars not containing a connection string or the SAS token (all other necessary information to build up the connection string is found in differend env-vars)

Context (Environment)

Device (Host) Operating System

Ubuntu 16.04

Architecture

amd64

Container Operating System

Linux containers

Runtime Versions

iotedged

1.0.0

Edge Agent

1.0

Edge Hub

1.0

Docker

Version: dev
API version: 1.37
Git commit 9aac187

Additional Information

In the preview versions the Connection String for the ModuleClient was injected into the docker container. The Environment Variable EdgeHubConnectionString is missing in the version. Additional there is no candidate in the Env-vars with could suits those needs. Even when combining the evn-vars, the SAS Token is missing.

@aribeironovaes
Copy link
Contributor

Hi @MPapst ,

This behavior is actually by design and it's a security change that we made on GA.
The Connection string (With exposed keys) is not injected any more into modules.
New modules should use new templates (Hence new SDK) that will call a new method (Create From Environment method) and this will make sure it will call our security daemon (iotedged) to get it's token.

Have you tried the new VS Code Template and did you have any problem?

Let us know,

Angelo Ribeiro.

@MPapst
Copy link
Author

MPapst commented Jul 3, 2018

@aribeironovaes, thanks thats working for me.
That was just a combination of some ugly circumstances... (dotnet new -i ... is not working when you have a private vsts nuget repository set up; the VSCode extension is supplying the old templates and the documentation in docs shows an env var that I did not even know)

Thanks for your help!

@MPapst MPapst closed this as completed Jul 3, 2018
avranju added a commit to avranju/iotedge that referenced this issue Mar 31, 2019
* Sanitize CRD resource name

* Update helm chart version
ggjjj pushed a commit to ggjjj/iotedge that referenced this issue Jul 22, 2021
# This is the 1st commit message:

typo for directories

# This is the commit message #2:

get content

# This is the commit message Azure#3:

display

# This is the commit message Azure#4:

get content

# This is the commit message Azure#5:

display contents

# This is the commit message Azure#6:

launchsettings

# This is the commit message Azure#7:

launchsettings.json

# This is the commit message Azure#8:

disable arm32
ggjjj pushed a commit to ggjjj/iotedge that referenced this issue Jul 22, 2021
# This is the 1st commit message:

typo for directories

# This is the commit message #2:

get content

# This is the commit message Azure#3:

display

# This is the commit message Azure#4:

get content

# This is the commit message Azure#5:

display contents

# This is the commit message Azure#6:

launchsettings

# This is the commit message Azure#7:

launchsettings.json

# This is the commit message Azure#8:

disable arm32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants