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

Fix/SK-903 | Clear-text logging of sensitive information #634

Merged
merged 2 commits into from
Jun 18, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/branch-name-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- master

env:
BRANCH_REGEX: '^((feature|github|hotfix|bugfix|fix|bug|docs|refactor)\/.+)|(release\/v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?))$'
BRANCH_REGEX: '^((feature|github|dependabot|hotfix|bugfix|fix|bug|docs|refactor)\/.+)|(release\/v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?))$'

jobs:
branch-name-check:
Expand Down
2 changes: 0 additions & 2 deletions fedn/network/api/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,6 @@ def add_client(self, client_id, preferred_combiner, remote_addr):
"certificate": cert,
"helper_type": self.control.statestore.get_helper(),
}
logger.info(f"Sending payload: {payload}")

return jsonify(payload)

def get_initial_model(self):
Expand Down
20 changes: 12 additions & 8 deletions fedn/network/grpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@


class Server:
""" Class for configuring and launching the gRPC server."""
"""Class for configuring and launching the gRPC server."""

def __init__(self, servicer, modelservicer, config):

set_log_level_from_string(config.get("verbosity", "INFO"))
set_log_stream(config.get("logfile", None))

Expand All @@ -34,21 +33,26 @@ def __init__(self, servicer, modelservicer, config):
health_pb2_grpc.add_HealthServicer_to_server(self.health_servicer, self.server)

if config["secure"]:
logger.info(f'Creating secure gRPCS server using certificate: {config["certificate"]}')
logger.info("Creating secure gRPCS server using certificate")
server_credentials = grpc.ssl_server_credentials(
((config["key"], config["certificate"],),))
self.server.add_secure_port(
"[::]:" + str(config["port"]), server_credentials)
(
(
config["key"],
config["certificate"],
),
)
)
self.server.add_secure_port("[::]:" + str(config["port"]), server_credentials)
else:
logger.info("Creating gRPC server")
self.server.add_insecure_port("[::]:" + str(config["port"]))

def start(self):
""" Start the gRPC server."""
"""Start the gRPC server."""
logger.info("gRPC Server started")
self.server.start()

def stop(self):
""" Stop the gRPC server."""
"""Stop the gRPC server."""
logger.info("gRPC Server stopped")
self.server.stop(0)
Loading