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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add authentication provider for Synology DSM users #58884

Closed
wants to merge 14 commits into from

Conversation

sdebruyn
Copy link

@sdebruyn sdebruyn commented Nov 1, 2021

Proposed change

This PR adds an authentication provider to allow users to authenticate using a Synology NAS.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

I probably have to add some strings somewhere, but I cannot find where.

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

home-assistant/home-assistant.io#20108

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

To help with the load of incoming pull requests:

@homeassistant
Copy link
Contributor

Hi @sdebruyn,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@project-bot project-bot bot added this to Needs review in Dev Nov 1, 2021
@MartinHjelmare MartinHjelmare changed the title add authentication provider for Synology DSM users Add authentication provider for Synology DSM users Nov 1, 2021
@MartinHjelmare MartinHjelmare moved this from Needs review to Incoming in Dev Nov 10, 2021
@sdebruyn sdebruyn marked this pull request as ready for review November 11, 2021 19:53
@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 13, 2022
@sdebruyn
Copy link
Author

The code still works with the latest version

@github-actions github-actions bot removed the stale label Feb 13, 2022
@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label May 20, 2022
@sdebruyn
Copy link
Author

Code still works with latest version

@github-actions github-actions bot removed the stale label May 20, 2022
@MartinHjelmare MartinHjelmare moved this from Incoming to Needs review in Dev Jun 26, 2022
Copy link
Contributor

@jbouwh jbouwh left a comment

Choose a reason for hiding this comment

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

I have been testing your PR. And in the base it works. What I am missing is a way to authorize authenticated users. All authenticated users are admin by default, that is not very useful.
Further I left some small comments. It seems your tests have not been running in the workflow.

Comment on lines +10 to +12
from homeassistant.auth import AuthProvider
from homeassistant.auth.models import Credentials, UserMeta
from homeassistant.auth.providers import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, LoginFlow
Copy link
Contributor

Choose a reason for hiding this comment

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

These should be relative imports

{
vol.Required("host"): str,
vol.Required("port"): int,
vol.Required("secure", default=False): bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is a required option, why supply a default value?

Dev automation moved this from Needs review to Review in progress Jul 12, 2022
@allenporter
Copy link
Contributor

My general impression is that this would allow login to home assistant using synology's authentication mechanism? I believe that extending authentication of home assistant has not been something that has been accepted in the recent past given the complexity and high bar for user expectations.

e.g.
home-assistant/architecture#286 (comment)
#37645 (comment)
#32926

@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Jan 18, 2023
@github-actions github-actions bot closed this Jan 25, 2023
Dev automation moved this from Review in progress to Cancelled Jan 25, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Cancelled
Development

Successfully merging this pull request may close these issues.

None yet

4 participants