InterSystems Server Manager
InterSystems Server Manager is a Visual Studio Code extension for defining connections to InterSystems servers. These definitions can used by other VS Code extensions when they make connections. One example is the ObjectScript extension for code editing. See the CHANGELOG for changes in each release. New in Version 3 - November 2021We are pleased to publish version 3 of this extension which improves the security of stored passwords by integrating with VS Code's Authentication Provider API. This significant new release took part in the November 2021 InterSystems Security Contest.
Thanks to George James Software for backing this development effort. The Authentication ProviderSince version 2 Server Manager has enabled you to store connection passwords in the native keystore of your workstation's operating system. This was a more secure alternative to you putting them as plaintext in your JSON files. However, the VS Code's Authentication Provider API, introduced in version 1.54 (February 2021) became mature enough in version 1.63 for us to use. Server Manager 3 does the following:
Signing InThe first time you expand a server in the tree VS Code displays a modal dialog asking for your permission: If you allow this and your server definition in If you proceed, or if this step was skipped because your server definition includes a username, the next step is: If you click the 'key' button after typing your password it will be saved securely in your workstation keychain, from where the 'InterSystems Server Credentials' authentication provider will be able to retrieve it after you restart VS Code. If instead you press 'Enter' the password will be available only until you restart VS Code. Either way, you are now signed in on the specified account. Trusting Other ExtensionsWhen another extension first asks to use an InterSystems Server Credentials account you must either allow this or deny it. For example, with a pre-release build of the InterSystems ObjectScript extension which uses the new authentication provider you get this after you click the edit pencil button alongside a namespace in the Server Manager tree: Managing Signed In AccountsYou can use the menu of VS Code's Accounts icon in the activity bar to manage your signed in accounts: The 'Manage Trusted Extensions' option lets you remove an extension from the list of those you previously granted access to this InterSystems Server Credentials account: The 'Sign Out' option lets you sign out this account after confirmation: When signing out an account for which you previously saved the password will get an option to delete the password, unless you have altered the New in Version 2 - April 2021The following features were originally introduced in Server Manager version 2. The Server TreeServer Manager displays connection definitions as a tree on an InterSystems Tools view: In this tree you can:
In common with the rest of VS Code, Server Manager stores your connection settings in JSON files. VS Code settings are arranged in a hierarchy that you can learn more about here. Server Manager can store connection passwords in the native keystore of your workstation's operating system. This is a more secure alternative to you putting them as plaintext in your JSON files. On Windows, Server Manager can create connection entries for all connections you previously defined with the original Windows app called InterSystems Server Manager. This action is available from the ' Defining a New Server
The server definition is added to your user-level Optionally use its context menu to store the password for the username you entered when defining the server. You can also set the color of the server icon. The 'star' button that appears when you hover over the row lets you add the server to the Viewing and Editing Source Code
Learn more about
The 'Current' FolderWhen you have a folder or a workspace (including a multi-root one) open in VS Code, the Server Manager displays a 'Current' node at the start of its tree if your workspace references any server defined in Server Manager. The linking happens automatically if you added workspace folders from Server Manager as described above. If you are using the client-side mode of working, your Launching Management PortalWhen you hover over a server entry in the tree, two command buttons let you launch InterSystems Management Portal. The first button uses VS Code's Simple Browser feature, which creates a tab alongside any documents you may have open. The second button opens Portal in your workstation's default web browser. Notes About Simple Browser
Amending and Removing ServersTo manage your server definitions, including changing the username it connects with, edit the relevant JSON file.
In this example two connections have been defined:
The JSON editor offers the usual IntelliSense as you work in this structure. Notice how you can add a Servers are displayed in the quickpick in the order they are defined in the JSON file. The exception is that if a server name is set as the value of the A set of embedded servers with names beginning Removing a Stored PasswordUse the server's context menu. Alternatively, run Technical NotesLegacy ModeServer Manager 3 makes changes which may degrade the user experience relative to version 2. To revert, make this user-level setting:
Please only use this as a short term measure until extensions that use the Server Manager Colors, Favorites and RecentsThese features use VS Code's extension-private global state storage. Data is not present in your The 'All Servers' FolderThe If a server has been named in Embedded entries (built-in default ones) are demoted to the end of the list, or omitted completely if Information for VS Code Extension Developers - How To Leverage Server ManagerAn extension XYZ needing to connect to InterSystems servers can define Server Manager as a dependency in its
Alternatively the
XYZ can then use the extension's API to obtain the properties of a named server definition, including the password from the keychain if present:
If the To offer the user a quickpick of servers:
To obtain an array of server names:
For details of the API, including result types and available parameters, review the source code of the extension's Activity Bar icon made by Freepik from www.flaticon.com
|