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

Cloud Sign-In #5095

Merged
merged 117 commits into from
Jan 28, 2019
Merged

Cloud Sign-In #5095

merged 117 commits into from
Jan 28, 2019

Conversation

gmosx
Copy link
Contributor

@gmosx gmosx commented Jan 1, 2019

Introduces support code to allow for Cloud Sign In.

George Moschovitis added 12 commits December 13, 2018 19:46
…#131

Call claim url netdata#4771
Claim ui improvements netdata#4771
Cleanup
Implement Sign Out
Introduced sign-in modal netdata#3990
Added sign-in button
More work on the iframe trick
More work
More work on the logic, removed old obsolete stuff
Close modal
Implement account menu
Minor rename
Renamed my-netdata to My Agents
Show migrate button
Collect known agents
Work on migrateRegistryDidClick
Minor
Actually show agents from netdata cloud in the menu
Some cleanup
Keep all the alternate_urls for each agent
Fix for tooltips over SignIn/AccountMenu
…#131

Call claim url netdata#4771
Claim ui improvements netdata#4771
Cleanup
Implement Sign Out
Introduced sign-in modal netdata#3990
Added sign-in button
More work on the iframe trick
More work
More work on the logic, removed old obsolete stuff
Close modal
Implement account menu
Minor rename
Renamed my-netdata to My Agents
Show migrate button
Collect known agents
Work on migrateRegistryDidClick
Minor
Actually show agents from netdata cloud in the menu
Some cleanup
Keep all the alternate_urls for each agent
Fix for tooltips over SignIn/AccountMenu
To get the latest changes from master.
This wll allow the merging of the branch into master, so we can avoid nasty rebases.
@gmosx gmosx requested a review from ktsaou as a code owner January 1, 2019 15:40
@gmosx gmosx added the cloud Netdata hub/cloud related label Jan 1, 2019
@gmosx gmosx added this to In progress in Web GUI via automation Jan 1, 2019
@netdatabot
Copy link
Member

This pull request introduces 5 alerts when merging 5278349 into f73249c - view on LGTM.com

new alerts:

  • 2 for Clear text storage of sensitive information
  • 2 for Incomplete string escaping or encoding
  • 1 for Missing variable declaration

Comment posted by LGTM.com

@netdatabot
Copy link
Member

This pull request introduces 5 alerts when merging b2f1ce4 into f73249c - view on LGTM.com

new alerts:

  • 2 for Clear text storage of sensitive information
  • 2 for Incomplete string escaping or encoding
  • 1 for Missing variable declaration

Comment posted by LGTM.com

@netdatabot
Copy link
Member

This pull request introduces 2 alerts when merging 140b3db into f73249c - view on LGTM.com

new alerts:

  • 2 for Clear text storage of sensitive information

Comment posted by LGTM.com

@gmosx gmosx requested a review from cakrit January 2, 2019 07:24
@gmosx
Copy link
Contributor Author

gmosx commented Jan 2, 2019

@ktsaou, @cakrit if you can help, please clone this branch and verify that Netdata Agent works correctly (the user should see no cloud-related UI, global registry should work as before).

@netdatabot
Copy link
Member

This pull request introduces 2 alerts when merging 5eee7bc into d5fb2be - view on LGTM.com

new alerts:

  • 2 for Clear text storage of sensitive information

Comment posted by LGTM.com

@netdata netdata deleted a comment Jan 2, 2019
@ktsaou
Copy link
Member

ktsaou commented Jan 3, 2019

hm... it does not work for me.

  1. Could not login because of iframe, but when I did "open link in new tab" at "github login", I got the github authorization page, pressed "Authorize" and then got a page with the message: "you are SIGNED-IN".

  2. Once logged in, I refreshed the dashboard. On console I got the message "change, migrating!", but the server list in the "My Agents" menu was empty (only the demo sites were present).

  3. I refresh the dashboard once more, got again "change, migrating!" on the console. "My Agents" menu still empty.

  4. I pressed "log out", it told me I was signed out. I refreshed the page, but I was "logged in" and my servers were shown (from registry - I see the requests).

  5. Now the console shows CORS errors:

Access to fetch at 'https://netdata-hub.appspot.com/api/v1/accounts/GUID/known-agents' from origin 'http://localhost:19999' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

So, now as far as I can tell:

  • I am supposed to be logged out
  • The dashboard says I am signed in (it shows my name at the top right)
  • The registry is still being contacted (and the "My Agent" menu has my servers)
  • A GET request to the hub returns 200
  • A POST request to the hub return 502

@netdatabot
Copy link
Member

This pull request introduces 3 alerts when merging f85149f into d4548fd - view on LGTM.com

new alerts:

  • 1 for Client-side cross-site scripting
  • 1 for Clear text storage of sensitive information
  • 1 for Ambiguous HTML id attribute

Comment posted by LGTM.com

@netdata netdata deleted a comment Jan 27, 2019
@netdatabot
Copy link
Member

This pull request introduces 3 alerts when merging 3cb56a0 into d4548fd - view on LGTM.com

new alerts:

  • 1 for Client-side cross-site scripting
  • 1 for Clear text storage of sensitive information
  • 1 for Ambiguous HTML id attribute

Comment posted by LGTM.com

@netdata netdata deleted a comment Jan 27, 2019
@netdatabot
Copy link
Member

This pull request introduces 3 alerts when merging 294ec6c into 61b6171 - view on LGTM.com

new alerts:

  • 1 for Client-side cross-site scripting
  • 1 for Clear text storage of sensitive information
  • 1 for Ambiguous HTML id attribute

Comment posted by LGTM.com

@netdata netdata deleted a comment Jan 27, 2019
@netdata netdata deleted a comment Jan 27, 2019
@netdatabot
Copy link
Member

This pull request introduces 2 alerts when merging d5ba930 into 61b6171 - view on LGTM.com

new alerts:

  • 1 for Client-side cross-site scripting
  • 1 for Clear text storage of sensitive information

Comment posted by LGTM.com

@netdatabot
Copy link
Member

This pull request introduces 1 alert when merging 11f0733 into 61b6171 - view on LGTM.com

new alerts:

  • 1 for Clear text storage of sensitive information

Comment posted by LGTM.com

@netdatabot
Copy link
Member

This pull request introduces 1 alert when merging 4cb38b4 into 61b6171 - view on LGTM.com

new alerts:

  • 1 for Clear text storage of sensitive information

Comment posted by LGTM.com

ktsaou
ktsaou previously approved these changes Jan 28, 2019
@netdatabot
Copy link
Member

This pull request introduces 1 alert when merging eadbd1d into 61b6171 - view on LGTM.com

new alerts:

  • 1 for Clear text storage of sensitive information

Comment posted by LGTM.com

@gmosx gmosx merged commit b6ce817 into netdata:master Jan 28, 2019
Web GUI automation moved this from In progress to Done Jan 28, 2019
@gmosx gmosx deleted the cloud-sign-in-2 branch January 28, 2019 10:27
@netdata netdata deleted a comment Jan 28, 2019
@netdata netdata deleted a comment Jan 28, 2019
@cakrit cakrit mentioned this pull request Mar 1, 2019
kiku-jw pushed a commit to kiku-jw/netdata that referenced this pull request Mar 4, 2019
* Manually merged changes from old hub-support branch, tracking netdata#131

Call claim url netdata#4771
Claim ui improvements netdata#4771
Cleanup
Implement Sign Out
Introduced sign-in modal netdata#3990
Added sign-in button
More work on the iframe trick
More work
More work on the logic, removed old obsolete stuff
Close modal
Implement account menu
Minor rename
Renamed my-netdata to My Agents
Show migrate button
Collect known agents
Work on migrateRegistryDidClick
Minor
Actually show agents from netdata cloud in the menu
Some cleanup
Keep all the alternate_urls for each agent
Fix for tooltips over SignIn/AccountMenu

* Actually use NETDATA.registry.cloudBaseURL

Tricky!

* Hide switch identity when signed-in netdata#153

* Manually merged changes from old hub-support branch, tracking netdata#131

Call claim url netdata#4771
Claim ui improvements netdata#4771
Cleanup
Implement Sign Out
Introduced sign-in modal netdata#3990
Added sign-in button
More work on the iframe trick
More work
More work on the logic, removed old obsolete stuff
Close modal
Implement account menu
Minor rename
Renamed my-netdata to My Agents
Show migrate button
Collect known agents
Work on migrateRegistryDidClick
Minor
Actually show agents from netdata cloud in the menu
Some cleanup
Keep all the alternate_urls for each agent
Fix for tooltips over SignIn/AccountMenu

* Actually use NETDATA.registry.cloudBaseURL

Tricky!

* Hide switch identity when signed-in netdata#153

* Cleanup

* Refresh menu on sign-in

* Disable cloud functionality if cloud base url is not set.

This wll allow the merging of the branch into master, so we can avoid nasty rebases.

* Updated to use the latest API endpoints

* Fixed a couple of LGTM warnings

* Improved migration algorithm, some cleanup.

* Update My-Netdata menu on sign-out

* Minor

* Replaced modal with window

* Update the My-Agents menu after migration, cleanup

* Make the agent work after switching cloudBaseURL, cleanup

* Introduced event tracing for analytics

* Minor

* Removed GA

* Fixed error reported by LGTM

* Only send the diff when syncing agents to ameliorate the load on the backend, cleanup

* Reverted My-Netdata name, added some logging

* Add Netdata Cloud menu item

* Minor

* Use the merge: false option and a fix

* Added loading message in my-netdata menu

* Show error if we cannot connect to netdata.cloud

* Minor

* Implemented deleteCloudKnownAgentURL api call, use it in my-netdata menu.

* Removed menu entry

* Disable my-netdata menu if user is not signed-in and using the global registry

* Stop accessing the registry if it's not used.

* Mask the agent url if the registry is in 'disabled' mode

* Filter masked urls

* Improved filtering of masked urls

* Try to eagerly initialize the account ui to improve perceived performance

* Minor

* Don't search for other people's urls in cloud-enabled mode.

* Added basic my-netdata filtering

* Filter streamed host, aesthetic fixes

* Minor

* Some improvements of the filter ui

* Removed What is this

* Added placeholder to input, other fixes netdata#240

* Show message if no databases match filter criteria

* Fixed bug where agent lists where not merged

* Minor

* Hide modal if it redirects to self.

* autocomplete off for filter input

* Enable delete for custom registries, don't show error if delete fails

* Filter agents without urls

* Fix LGTM warning

* Minor

* Concatenate at client side, used the faster merge: false path

* Added a clear button to the filter for extra usability

* Minor

* Minor

* Improvements for small screens (more needed)

* Combined  my-netdata menu and hostname

* Re-enabled registry masking

* Show agent-filter only when signed-in

* Improved syncAgents

* Don't mask if using custom registry

* Reject agents with empty urls

* Filter valid agents

* Fixed a couple of bugs

* Applied Chris' fixes

* Fix in registry.c

* Cleanup

* Only sync once

* Implemented forceSync

* Added what is this

* sso, wip

* Working SSO sign-in/sign-out, cleanup

* Added Chris' patch

* Added a modal that explains what synchronize is doing

* Use sso-agent

* Use origin as query param in sign-in

* iframe -> origin

* Pass machine_guid to sso

* Make sure that the current netdata agent is synchronized hub#262

* Normalize originURL

* Reenable tryFastInitCloud()

* Updated to the latest endpoints

* Support synchronizing to multiple cloud accounts

* Set default cloud base url to netdata.cloud

* Fix filter issues with Firefox

* Fix for double tooltip on sign-in

* Show known servers in console for debugging purposes

* Don't block on errors to delete from registry when signed in

* Disable tryFastInitCloud

* Improved styling for filter input

* Improved styling in my-netdata menu

* Display the registry url in the sync-registry modal

* agents -> nodes in texts

* Support for sso-precheck

* Do not implicitly synchronize custom registries.

* Improvement to syncAgents (more coming)

* More fixes

* Don't sign in users with private registries if they don't consent on the sync

* Set netdataRegistryAfterMs = 0

* Don't pass url to sso-agent

* Added Chris' patch to alarm-notify

* Refactored syncAgent/mergeAgents, make sure current Agent is synced on sign-in.

* Fix for LGTM warning

* Minor

* Fix for a XSS warning

* Extra check for dataLayer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry area/web cloud Netdata hub/cloud related
Projects
No open projects
Web GUI
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants