-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Better integration with Cloud Companion: Login/Logout support …
…and 'profile' override in bealine:// (#7) * feat: Add profile override support to the bealine:// protocol The 'profile picker' in the downloader looks at the Bealine config and matches the first profile(in the order they are in .bealine/config) that has that farm as default. This is not-precise. I saw some cases where a user had multiple profiles, but only the second one was valid. This is not likely to happen with 'real' customers, but is completely a non-obvious behavior to anyone. With this change, Cloud Companion(when its used) and set this profile name, ensuring the downloader is using the same profile as Cloud Companion. Of course, longer term we hope to put this downloader right into Cloud Companion, but for now seems worthwhile. Testing: - Added a unit test to validate the profile is overriden as expected * feat!: Add CloudCompanion support for Login/Logout BREAKING CHANGE: api.login and api.logout signatures have changed slightly 1. The return value of api.Login has changed. Itaswere and still is a string, but instead of assuming it's a SSO start URL it is now a more complete message for the user. Users no longer have to frame as 'SSO Start URL {return_value}' but use the value as the message 2. onPendingAuthorization now only uses kwargs. This is because SSO/CloudCompanion login types provide different information. The Login/Logout button now understand both Permission Sets and CloudCompanion. Cloud Companion will now 'owns' a section in .bealine/config, [cloud-companion]. It will write a key 'path' that is the path to its executable when it is used. Bealine already assumes that any AWS profile with the 'studio_id' key is managed by Cloud Companion. If the user attempts to 'login' then we use that path from the config and invoke CloudCompanion with a known set of args(login --profile {profileName}). We then wait for the credentials to become valid. Logout works similarly CloudCompanion has a corresponding change to add these login/logout commands. When 'login' is used, CloudCompanion pops up and logs into that profile. Once it logs in, it shows a dialog telling the user it will minimize which will then bring BeaLine back into focus There's a slight change to the return values of api.login/api.logout. Testing: * Only tested on mac so far. I will test on windows during PR review * I tested login/logout through the dev GUI for both a permissionset and Cloud Companion * New unit tests added and some updated * login/logout also work via the CLI
- Loading branch information
1 parent
e8cf9d3
commit 2155cda
Showing
10 changed files
with
306 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.