Skip to content

Keter 1.6 doesn't pass env variables in app config when setuid is set in global config #237

@joyfulmantis

Description

@joyfulmantis

In keter 1.6 when I am using the new config format (stanzas), and listing variables to be passed down (through env), if setuid is set in the global config, then the listed variables end up not being passed down to the app. I am theorizing that this is caused by the variables being somehow lost with sudo being called. However, strangely enough, this is only the case for the environment variables listed in the app config. The environment variables always passed down by keter (port) and the ones passed down from the postgres plugin aren't affected.

Attached are sample app keter.yaml and global keter-config.yaml files:

root: /var/www/keter
listeners:
    - host: "*4"
      port: 80
    # HTTPS

# Disabling this allows the enviroment variable "env:Production" to be passed down to the app
setuid: www-data
stanzas:
  - type: webapp
    exec: ../bin/example
    host: localhost
    env:
      ENV: Production
plugins:
    postgers: true
    postgres:
      - server: localhost
        port: 5432

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions