Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions server/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ services:
timeout: 30s
retries: 3
environment:
RECCEIVER_PROCS: cf
RECCEIVER_LOGLEVEL: DEBUG
RECCEIVER_INFOTAGS: archive
RECCEIVER_ALIAS: TRUE
RECCEIVER_RECORDTYPE: TRUE
RECCEIVER_RECORDDESC: TRUE
RECCEIVER_CLEANONSTART: TRUE
RECCEIVER_USERNAME: admin
RECCEIVER_RECCEIVER_PROCS: cf
RECCEIVER_RECCEIVER_LOGLEVEL: DEBUG
RECCEIVER_CF_INFOTAGS: archive
RECCEIVER_CF_ALIAS: TRUE
RECCEIVER_CF_RECORDTYPE: TRUE
RECCEIVER_CF_RECORDDESC: TRUE
RECCEIVER_CF_CLEANONSTART: TRUE
RECCEIVER_CF_USERNAME: admin
RECCEIVER_CF_CFUSERNAME: admin
RECCEIVER_CF_CFPASSWORD: password
RECCEIVER_CF_BASEURL: http://cf:8080/ChannelFinder
RECCEIVER_CF_VERIFYSSL: FALSE
volumes:
- type: bind
source: docker/config/cf.conf
Expand Down
13 changes: 13 additions & 0 deletions server/demo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,16 @@

# The env variable to use for the owner field when creating channels in channelfinder
#env_owner_variable = ENGINEER

# ChannelFinderClient configuration
# The URL of the ChannelFinder instance to connect to
#baseUrl = http://localhost:8080/ChannelFinder

# Username to login to ChannelFinder with
#cfUsername = cfstore

# Password to login to ChannelFinder with
#cfPassword = cfstore

Check warning on line 120 in server/demo.conf

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make sure these credentials get revoked, changed, and removed from the code.

See more on https://sonarcloud.io/project/issues?id=ChannelFinder_recsync&issues=AZ0qxx9fX_pfP-bGD7mI&open=AZ0qxx9fX_pfP-bGD7mI&pullRequest=141

Check notice

Code scanning / SonarCloud

Credentials should not be hard-coded Low

Make sure these credentials get revoked, changed, and removed from the code. See more on SonarQube Cloud

# Whether to verify the SSL certificate when connecting to ChannelFinder
#verifySSL = True
8 changes: 4 additions & 4 deletions server/recceiver/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
]


def _env_vars():
prefix = "RECCEIVER_"
def _env_vars(section: str) -> dict[str, str]:
prefix = "RECCEIVER_" + section.upper() + "_"
return {k.removeprefix(prefix).lower(): v for k, v in os.environ.items() if k.startswith(prefix)}


class ConfigAdapter(object):
def __init__(self, conf, section):
self._C, self._S = conf, section
self.env_vars = _env_vars()
self.env_vars = _env_vars(section)

def __len__(self):
return len(self._C.items(self._S, raw=True))
Expand Down Expand Up @@ -77,7 +77,7 @@ def __init__(self, cfile=None):
elif not parser.has_section("recceiver"):
parser.add_section("recceiver")

pnames = parser.get("recceiver", "procs", vars=_env_vars()).split(",")
pnames = parser.get("recceiver", "procs", vars=_env_vars("recceiver")).split(",")

plugs = {}

Expand Down
19 changes: 12 additions & 7 deletions server/recceiver_full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,15 @@
# The env variable to use for the owner field when creating channels in channelfinder
env_owner_variable = ENGINEER

# The channelFinder client is configuration information is
# stored in /etc/channelfinderapi.conf as described in the client
# Can be configured to be this file, like so:
[DEFAULT]
BaseURL=http://channelfinder.site:8080/ChannelFinder
username=MyUserName
password=MyPassword
# ChannelFinderClient configuration
# The URL of the ChannelFinder instance to connect to
baseUrl = https://channelfinder.example.com/ChannelFinder

# Username to login to ChannelFinder with
cfUsername = recceiver-cfstore

# Password to login to ChannelFinder with
cfPassword = somethingcryptic

Check warning on line 115 in server/recceiver_full.conf

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make sure these credentials get revoked, changed, and removed from the code.

See more on https://sonarcloud.io/project/issues?id=ChannelFinder_recsync&issues=AZ0qxx5cX_pfP-bGD7mH&open=AZ0qxx5cX_pfP-bGD7mH&pullRequest=141

Check notice

Code scanning / SonarCloud

Credentials should not be hard-coded Low

Make sure these credentials get revoked, changed, and removed from the code. See more on SonarQube Cloud

# Whether to verify the SSL certificate when connecting to ChannelFinder
verifySSL = True
Loading