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

New Auth Implementation #2926

Merged
merged 65 commits into from
Aug 23, 2022
Merged

New Auth Implementation #2926

merged 65 commits into from
Aug 23, 2022

Conversation

sgilbride
Copy link
Contributor

Description

These changes are the initial steps for decoupling auth features from the VOLTTRON platform. This would allow auth to be used when required, and remove the authentication/authorization layers from instances where they are not required.

In addition, auth is restructured to develop authorization and authentication base classes, with standardized APIs. This will help with future efforts to provide fully modular auth packages for specific message busses or use cases.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Testing is in progress

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

shwethanidd and others added 20 commits December 21, 2020 08:47
…on_auth_volttron

# Conflicts:
#	volttron/platform/auth.py
#	volttron/platform/main.py
Resolved
Updgrade Non-Auth VOLTTRON to 8.1.1
…isplay and not Agent instance.

Disabled auth subsystem in volttron agent.
…lttron into non_auth_volttron

Keeping main the same for now to avoid conflicts with multi-router.
TODO: Finish re-implementation of zap loop.
TODO: Update RMQ backwards compatibility with ZMQ through ZMQAuthorization
TODO: Rename auth_protocols
TODO: Read auth_enabled/version from config file correctly.
Added dataclasses for parameters.
Moved and restructured code to break out rmq and zmq, and provide standardized APIs where applicable.
@sgilbride sgilbride changed the title Non/Modular Auth Implementation New Auth Implementation Mar 16, 2022
@sgilbride sgilbride requested review from craig8, schandrika and shwethanidd and removed request for schandrika March 16, 2022 06:26
# PACIFIC NORTHWEST NATIONAL LABORATORY operated by
# BATTELLE for the UNITED STATES DEPARTMENT OF ENERGY
# under Contract DE-AC05-76RL01830
# }}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding

# Only include things we want
___all__ = ["AuthEntry"]

# Don't expose where the "Real" class is located.
from volttron.platform.auth.auth_entry import AuthEntry

For all of these items.

gilb842 added 4 commits March 23, 2022 13:23
Updated terminology in main/config.
Updated allow auth to be True by default.
Cleaned up some imports.
Added handling for allow_auth and AUTH_ENABLED to manage use of auth in config file.
Minor code cleanup.
Added grequests.
Updated connection_params for build_remote_connection_params.
Fixed url_address missing from RMQConnectionAPI.
if cert_dir:
# remote cert file for agents will be in agent-data/remote-certs dir
certfile = os.path.join(cert_dir, os.path.basename(certfile))
_log.info("build_remote_connection_param: {}".format(certfile))

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

[Sensitive data (certificate)](1) is logged here. [Sensitive data (certificate)](2) is logged here. [Sensitive data (certificate)](3) is logged here. [Sensitive data (certificate)](2) is logged here.
volttron/platform/main.py Fixed Show fixed Hide fixed
@craig8 craig8 marked this pull request as ready for review August 8, 2022 17:27
destination_serverkey = serverkey

_log.debug(
"Connecting using: %s", get_fq_identity(self.identity)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

[Sensitive data (password)](1) is logged here. [Sensitive data (password)](2) is logged here. [Sensitive data (password)](3) is logged here. [Sensitive data (password)](3) is logged here. [Sensitive data (password)](2) is logged here. [Sensitive data (password)](3) is logged here. [Sensitive data (password)](4) is logged here. [Sensitive data (password)](2) is logged here.
@craig8 craig8 merged commit 8dedf5d into VOLTTRON:develop Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants