Skip to content

Disallow use insecure_example auth provider in configuration.yml#15504

Merged
balloob merged 2 commits intohome-assistant:devfrom
awarecan:disabllow-insecure-auth-prov
Jul 17, 2018
Merged

Disallow use insecure_example auth provider in configuration.yml#15504
balloob merged 2 commits intohome-assistant:devfrom
awarecan:disabllow-insecure-auth-prov

Conversation

@awarecan
Copy link
Copy Markdown
Contributor

@awarecan awarecan commented Jul 17, 2018

Description:

Disallow use insecure_example auth provider in configuration.yml

The insecure_example auth provider is for testing only.

Related issue (if applicable): fixes #15199

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@awarecan awarecan requested a review from a team as a code owner July 17, 2018 07:52
@homeassistant homeassistant added cla-signed core small-pr PRs with less than 30 lines. labels Jul 17, 2018
@ghost ghost added the in progress label Jul 17, 2018
assert len(hass.auth.auth_providers) == 2


async def test_auth_provider_config(hass):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

redefinition of unused 'test_auth_provider_config' from line 796

}
await config_util.async_process_ha_core_config(hass, core_config)

assert hass.auth.active == True
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

comparison to True should be 'if cond is True:' or 'if cond:'

@awarecan awarecan force-pushed the disabllow-insecure-auth-prov branch from 6aea384 to a431dcb Compare July 17, 2018 08:28
@awarecan awarecan force-pushed the disabllow-insecure-auth-prov branch from a431dcb to 7fe708c Compare July 17, 2018 09:13
@balloob balloob added this to the 0.74 milestone Jul 17, 2018
@balloob balloob merged commit 2022d39 into home-assistant:dev Jul 17, 2018
@ghost ghost removed the in progress label Jul 17, 2018
@balloob
Copy link
Copy Markdown
Member

balloob commented Jul 17, 2018

Great! I think at a later point we can move the insecure example to the test dir and just patch it in place with a fixture when we want to do testing.

@awarecan
Copy link
Copy Markdown
Contributor Author

I think it is okay keep insecure_example in place, so that other developer can have an example to follow. No one will look at tests folder I believe.

@awarecan awarecan deleted the disabllow-insecure-auth-prov branch July 17, 2018 17:59
balloob pushed a commit that referenced this pull request Jul 18, 2018
)

* Disallow use insecure_example auth provider in configuration.yml

* Add unit test for auth provider config validate
@balloob balloob mentioned this pull request Jul 20, 2018
michaeldavie pushed a commit to michaeldavie/home-assistant that referenced this pull request Jul 31, 2018
…e-assistant#15504)

* Disallow use insecure_example auth provider in configuration.yml

* Add unit test for auth provider config validate
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
…e-assistant#15504)

* Disallow use insecure_example auth provider in configuration.yml

* Add unit test for auth provider config validate
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make insecure auth provider for tests only

4 participants