@microsoft/windows-admin-center-sdk 2.298.0 → 2.301.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/angular/assets/strings/cs-CZ/strings.json +1 -1
- package/angular/assets/strings/de-DE/strings.json +1 -1
- package/angular/assets/strings/es-ES/strings.json +1 -1
- package/angular/assets/strings/fr-FR/strings.json +1 -1
- package/angular/assets/strings/hu-HU/strings.json +1 -1
- package/angular/assets/strings/it-IT/strings.json +1 -1
- package/angular/assets/strings/ja-JP/strings.json +1 -1
- package/angular/assets/strings/ko-KR/strings.json +1 -1
- package/angular/assets/strings/nl-NL/strings.json +1 -1
- package/angular/assets/strings/pl-PL/strings.json +1 -1
- package/angular/assets/strings/pt-BR/strings.json +1 -1
- package/angular/assets/strings/pt-PT/strings.json +1 -1
- package/angular/assets/strings/ru-RU/strings.json +1 -1
- package/angular/assets/strings/strings.json +1 -1
- package/angular/assets/strings/sv-SE/strings.json +1 -1
- package/angular/assets/strings/tr-TR/strings.json +1 -1
- package/angular/assets/strings/zh-CN/strings.json +1 -1
- package/angular/assets/strings/zh-TW/strings.json +1 -1
- package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.js +239 -568
- package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.js.map +1 -1
- package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.min.js +2 -2
- package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.min.js.map +1 -1
- package/angular/esm2015/src/controls/actions/containers/action-bar/action-bar.component.js +2 -7
- package/angular/esm2015/src/controls/alert-bar/alert-bar.component.js +5 -5
- package/angular/esm2015/src/controls/common/base.component.js +1 -8
- package/angular/esm2015/src/controls/data-table/data-table.component.js +9 -39
- package/angular/esm2015/src/controls/form/form-field/checklist/checklist-form-field.component.js +8 -11
- package/angular/esm2015/src/controls/form/form-field/combobox/combobox-form-field.component.js +9 -8
- package/angular/esm2015/src/controls/form/form-field/file/file-form-field.component.js +2 -14
- package/angular/esm2015/src/controls/form/form-field/form-field.component.js +2 -9
- package/angular/esm2015/src/controls/layout/layout-definition.component.js +2 -9
- package/angular/esm2015/src/controls/layout/layout.component.js +2 -11
- package/angular/esm2015/src/controls/master-view/master-view.component.js +5 -32
- package/angular/esm2015/src/controls/page-alert-bar/models/index.js +1 -1
- package/angular/esm2015/src/controls/pivot/pivot-tab.component.js +1 -1
- package/angular/esm2015/src/controls/pivot/pivot.component.js +4 -21
- package/angular/esm2015/src/controls/property-grid/property-grid-item.component.js +2 -50
- package/angular/esm2015/src/controls/property-grid/property-grid.component.js +60 -73
- package/angular/esm2015/src/controls/property-grid/property-grid.module.js +1 -5
- package/angular/esm2015/src/controls/settings/common-settings/common-settings.component.js +70 -151
- package/angular/esm2015/src/controls/settings/settings.component.js +8 -48
- package/angular/esm2015/src/controls/settings/settings.module.js +9 -21
- package/angular/esm2015/src/controls/wizard/wizard.component.js +65 -55
- package/angular/esm2015/src/generated/strings.js +1 -1
- package/angular/esm2015/src/service/app-context.service.js +1 -3
- package/angular/fesm2015/microsoft-windows-admin-center-sdk-angular.js +239 -545
- package/angular/fesm2015/microsoft-windows-admin-center-sdk-angular.js.map +1 -1
- package/angular/package.json +0 -2
- package/angular/src/controls/common/base.component.d.ts +0 -5
- package/angular/src/controls/data-table/data-table.component.d.ts +0 -15
- package/angular/src/controls/form/form-field/checklist/checklist-form-field.component.d.ts +0 -1
- package/angular/src/controls/form/form-field/file/file-form-field.component.d.ts +0 -4
- package/angular/src/controls/layout/layout-definition.component.d.ts +1 -6
- package/angular/src/controls/master-view/master-view.component.d.ts +2 -118
- package/angular/src/controls/page-alert-bar/models/index.d.ts +1 -1
- package/angular/src/controls/pivot/pivot-tab.component.d.ts +1 -0
- package/angular/src/controls/pivot/pivot.component.d.ts +0 -7
- package/angular/src/controls/property-grid/property-grid-item.component.d.ts +3 -53
- package/angular/src/controls/property-grid/property-grid.component.d.ts +2 -1
- package/angular/src/controls/property-grid/property-grid.module.d.ts +3 -4
- package/angular/src/controls/settings/common-settings/common-settings.component.d.ts +1 -32
- package/angular/src/controls/settings/settings.component.d.ts +1 -18
- package/angular/src/controls/settings/settings.module.d.ts +1 -3
- package/angular/src/generated/strings.d.ts +0 -3
- package/core/base/environment.d.ts +0 -10
- package/core/base/environment.js.map +1 -1
- package/core/data/gateway-connection.d.ts +0 -34
- package/core/data/gateway-connection.js +2 -59
- package/core/data/gateway-connection.js.map +1 -1
- package/core/data/node-connection.d.ts +0 -4
- package/core/data/node-connection.js.map +1 -1
- package/core/data/powershell.d.ts +0 -4
- package/core/data/powershell.js +0 -1
- package/core/data/powershell.js.map +1 -1
- package/core/diagnostics/sme-web-telemetry-models.d.ts +3 -20
- package/core/diagnostics/sme-web-telemetry-models.js +2 -6
- package/core/diagnostics/sme-web-telemetry-models.js.map +1 -1
- package/core/diagnostics/sme-web-telemetry.d.ts +1 -13
- package/core/diagnostics/sme-web-telemetry.js +11 -51
- package/core/diagnostics/sme-web-telemetry.js.map +1 -1
- package/core/generated/powershell-scripts.d.ts +0 -4
- package/core/generated/powershell-scripts.js +0 -4
- package/core/generated/powershell-scripts.js.map +1 -1
- package/core/index.d.ts +0 -2
- package/core/index.js +0 -1
- package/core/index.js.map +1 -1
- package/core/manifest/environment-modules.js +0 -10
- package/core/manifest/environment-modules.js.map +1 -1
- package/core/notification/powershell-notification.js +1 -1
- package/core/notification/powershell-notification.js.map +1 -1
- package/core/performance/performance-tracker.d.ts +0 -67
- package/core/performance/performance-tracker.js +4 -211
- package/core/performance/performance-tracker.js.map +1 -1
- package/core/rpc/credssp/rpc-credssp-model.d.ts +2 -27
- package/core/rpc/credssp/rpc-credssp-model.js +0 -10
- package/core/rpc/credssp/rpc-credssp-model.js.map +1 -1
- package/core/security/credssp-manager.d.ts +1 -15
- package/core/security/credssp-manager.js +0 -28
- package/core/security/credssp-manager.js.map +1 -1
- package/core/shared/gateway-inventory/gateway-inventory.d.ts +0 -10
- package/core/shared/gateway-inventory/gateway-inventory.js +0 -11
- package/core/shared/gateway-inventory/gateway-inventory.js.map +1 -1
- package/e2e/assets/strings/cs-CZ/strings.json +1 -1
- package/e2e/assets/strings/de-DE/strings.json +1 -1
- package/e2e/assets/strings/es-ES/strings.json +1 -1
- package/e2e/assets/strings/fr-FR/strings.json +1 -1
- package/e2e/assets/strings/hu-HU/strings.json +1 -1
- package/e2e/assets/strings/it-IT/strings.json +1 -1
- package/e2e/assets/strings/ja-JP/strings.json +1 -1
- package/e2e/assets/strings/ko-KR/strings.json +1 -1
- package/e2e/assets/strings/nl-NL/strings.json +1 -1
- package/e2e/assets/strings/pl-PL/strings.json +1 -1
- package/e2e/assets/strings/pt-BR/strings.json +1 -1
- package/e2e/assets/strings/pt-PT/strings.json +1 -1
- package/e2e/assets/strings/ru-RU/strings.json +1 -1
- package/e2e/assets/strings/strings.json +1 -1
- package/e2e/assets/strings/sv-SE/strings.json +1 -1
- package/e2e/assets/strings/tr-TR/strings.json +1 -1
- package/e2e/assets/strings/zh-CN/strings.json +1 -1
- package/e2e/assets/strings/zh-TW/strings.json +1 -1
- package/package.json +3 -5
- package/styles/css/main.css +1 -1
- package/tools/module-template/gulpfile.ts/index.ts +1 -1
- package/tools/package-lock.json +975 -14946
- package/tools/wac-cli/src/create/main.d.ts +3 -6
- package/tools/wac-cli/src/create/main.js +35 -87
- package/tools/wac-cli/src/create/main.js.map +1 -1
- package/tools/wac-cli/src/index.js +2 -2
- package/tools/wac-cli/src/index.js.map +1 -1
- package/tools/wac-cli/templates/{solution/manifest.json → manifest/solution-manifest.json} +0 -19
- package/tools/wac-cli/templates/{wac-template/src/manifest.json → manifest/tool-manifest.json} +0 -0
- package/tools/wac-cli/templates/wac-template/angular.json +2 -2
- package/tools/wac-cli/templates/wac-template/gulpfile.ts/config-data.ts +1 -1
- package/tools/wac-cli/templates/wac-template/package.json +8 -0
- package/tools/wac-cli/templates/wac-template/src/app/app-routing.module.ts +1 -1
- package/tools/wac-cli/templates/wac-template/src/main.ts +0 -2
- package/tools/wac-cli/templates/wac-template/src/polyfills.ts +1 -1
- package/tools/wac-cli/templates/wac-template/src/test.ts +2 -2
- package/core/data/gateway-status.d.ts +0 -24
- package/core/data/gateway-status.js +0 -3
- package/core/data/gateway-status.js.map +0 -1
- package/core/data/wdac-operations.d.ts +0 -123
- package/core/data/wdac-operations.js +0 -144
- package/core/data/wdac-operations.js.map +0 -1
- package/tools/wac-cli/templates/internal/npmrc.txt +0 -6
- package/tools/wac-cli/templates/internal/package.json +0 -101
- package/tools/wac-cli/templates/solution/strings.resjson +0 -16
- package/tools/wac-cli/templates/wac-template/src/version.ts +0 -3
- package/tools/wac-cli/templates/wac-template/version.json +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../packages/core/security/credssp-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAOH,+BAA+B,EAC/B,uBAAuB,EACvB,qBAAqB,EAExB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAGpF;;GAEG;AACH,MAAM,OAAO,cAAc;IAGvB;;;;OAIG;IACH,YAAoB,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,EAA6B,CAAC;IAC5D,CAAC;IAEM,UAAU;QACb,iCAAiC;QACjC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,OAAO,EAAE,I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CAAC,eAAe,EAAE,CAAC;oBAC7D,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;iBAC5B;qBAAM;oBACH,OAAO,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;iBAC9C;aACJ;YAED,OAAO,EAAE,CAAU,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC;IAED;;;OAGG;IACK,aAAa,CAAC,IAA+B;QACjD,OAAO,CAAC,QAAQ,CACZ,gBAAgB,EAChB,6DAA6D,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAEhG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAExB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;CACJ","file":"credssp-manager.js","sourcesContent":["import { from, Observable, of, Subject, throwError } from 'rxjs';\r\nimport { filter, map, mergeMap, take } from 'rxjs/operators';\r\nimport { ErrorExtended } from '../data/error-extended';\r\nimport { Logging } from '../diagnostics/logging';\r\nimport {\r\n ClientRoleConfiguration,\r\n ConfigurationStatus,\r\n Credentials,\r\n GatewayLocalPowerShellConfig,\r\n RpcCredSSPOperation,\r\n RpcCredSSPOperationResult,\r\n RpcCredSSPOperationResultMember,\r\n RpcCredSSPOperationType,\r\n RpcCredSspResponseKey,\r\n ServerRoleConfiguration\r\n} from '../rpc/credssp/rpc-credssp-model';\r\nimport { RpcCredSspRequestClient } from '../rpc/credssp/rpc-credssp-request-client';\r\nimport { Rpc } from '../rpc/rpc';\r\n\r\n/**\r\n * CredSPP Manager class. Handles detecting and configuring CredSSP on a set of servers.\r\n */\r\nexport class CredSSPManager {\r\n private watcher: Subject<RpcCredSSPOperationResult>;\r\n\r\n /**\r\n * Initializes a new instance of the Authorization Manager class.\r\n *\r\n * @param rpc The rpc to forward auth requests to a parent window\r\n */\r\n constructor(private rpc: Rpc) {\r\n this.watcher = new Subject<RpcCredSSPOperationResult>();\r\n }\r\n\r\n public initialize() {\r\n // When in Shell do not register.\r\n if (!this.rpc.isShell) {\r\n this.rpc.register(RpcCredSspResponseKey.command, this.onRpcResponse.bind(this));\r\n }\r\n }\r\n\r\n /**\r\n * New Enable CredSSP on the passed in server.\r\n *\r\n * @param serverName This server on which CredSSP should be enabled\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanEnableManagedServer(serverName: string, verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('A server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableManagedServer,\r\n serverNames: [serverName],\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * New Disable CredSSP for the passed in server.\r\n *\r\n * @param serverName This server on which CredSSP should be disabled\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanDisableManagedServer(serverName: string, verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('A server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.DisableManagedServer,\r\n serverNames: [serverName],\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * New Enable CredSSP client role for the gateway and delegate to the list of servers.\r\n *\r\n * @param serverNames This list of servers where CredSSP should be enabled.\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanEnableClientRole(serverNames: string[], verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableClientRole,\r\n serverNames: serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * New Disable CredSSP client role for the gateway and remove all delegated servers.\r\n *\r\n * @param serverNames This list of servers where CredSSP should be disabled\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanDisableClientRole(serverNames: string[], verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.DisableClientRole,\r\n serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * Use tryGatewayLocalPowershellConfig instead which will only enable CredSSP when the gateway is making\r\n * a double hop to a remote node. This method will enable CredSSP every time, even in cases where\r\n * it is not needed.\r\n *\r\n * New Enable the server as a CredSSP server, and enable the gateway as a CredSSP client of the server.\r\n *\r\n * @param serverName The server where CredSSP delegation should be enabled\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanEnableDelegation(serverName: string, verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('The server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableDelegation,\r\n serverNames: [serverName],\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * Check to see if given servers contain the gateway machine. If not, enable CredSSP, otherwise, do nothing.\r\n *\r\n * @param serverNames String array of server names to check for a match with the gateway server name.\r\n * If not found, CredSSP will be enabled between the gateway machine and the server name at index 0.\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored.\r\n * @returns GatewayLocalPowerShellConfig object if success, null otherwise.\r\n */\r\n public tryGatewayLocalPowerShellConfig(serverNames: string[], verbose: boolean = false): Observable<GatewayLocalPowerShellConfig> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (serverNames.length === 0 || serverNames.some(serverName => MsftSme.isNullOrWhiteSpace(serverName))) {\r\n throw new Error('The server name(s) must be provided.');\r\n }\r\n\r\n return this.sendRequest<GatewayLocalPowerShellConfig>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.TryGatewayLocalPowerShellConfig,\r\n serverNames: serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Data);\r\n }\r\n\r\n /**\r\n * Test WSMan CredSSP connection from gateway to server(s)\r\n *\r\n * @param serverNames the servers to test connection to from gateway\r\n * @param credentials explicit credentials(username and password) to be used to WSMan CredSSP test\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @returns true if we can safely connect to all server without isssues otherwise returns false\r\n */\r\n public testCredSSP(serverNames: string[], credentials: Credentials, verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames.length || serverNames.some(\r\n serverName => MsftSme.isNullOrWhiteSpace(serverName))\r\n ) {\r\n throw new Error('The server name(s) must be provided.');\r\n }\r\n\r\n if (!credentials || !credentials.username || !credentials.password) {\r\n throw new Error('Username and password must be provided in the options.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.TestCredSSP,\r\n serverNames: serverNames,\r\n credentials,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * Get the CredSSP client role configuration of the gateway, including:\r\n * 1. Client role of gateway to delegate fresh credentials\r\n * 2. Which servers can be delegated fresh credentials\r\n *\r\n * @param serverNames The list of servers to check credential delegation status\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @returns ClientRoleConfiguration object of the gateway client role configuration\r\n */\r\n public wsmanGetClientConfigurationOnGateway(serverNames: string[], verbose: boolean = false): Observable<ClientRoleConfiguration> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<ConfigurationStatus>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.ConfirmClientConfiguration,\r\n serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.ConfigurationStatus).pipe(map(response => response.client));\r\n }\r\n\r\n /**\r\n * Get the CredSSP server role configuration of the server.\r\n *\r\n * @param serverName The server to get the CredSSP configuration\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @returns ServerRoleConfiguration object of the managed server server role configuration\r\n */\r\n public wsmanGetManagedServerConfiguration(serverNames: string[], verbose: boolean = false): Observable<ServerRoleConfiguration[]> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<ConfigurationStatus>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.ConfirmManagedServerConfiguration,\r\n serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.ConfigurationStatus).pipe(map(response => <ServerRoleConfiguration[]>response.servers));\r\n }\r\n\r\n /**\r\n * Get the CredSSP delegation configuration, including:\r\n * 1. Client role of gateway to delegate fresh credentials\r\n * 2. Which servers can be delegated fresh credentials\r\n * 3. Server roles of each servers\r\n *\r\n * @param serverNames The list of servers to check credential delegation from gateway and to check server role status\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @returns ConfigurationData object of the client and server role configuation\r\n */\r\n public wsmanGetDelegationConfiguration(serverNames: string[], verbose: boolean = false): Observable<ConfigurationStatus> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<ConfigurationStatus>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.ConfirmDelegation,\r\n serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.ConfigurationStatus);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanEnableManagedServer instead.\r\n *\r\n * Enable CredSSP on the passed in server.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverName This server on which CredSSP should be enabled\r\n * @param alertId Optional notification Id\r\n */\r\n public enableManagedServer(alertTitle: string, serverName: string, alertId?: string): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('A server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableManagedServer,\r\n serverNames: [serverName],\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanDisableManagedServer instead.\r\n *\r\n * Disable CredSSP for the passed in server.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverName This server on which CredSSP should be disabled\r\n * @param alertId Optional notification Id\r\n */\r\n public disableManagedServer(alertTitle: string, serverName: string, alertId?: string): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('A server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.DisableManagedServer,\r\n serverNames: [serverName],\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanEnableClientRole instead.\r\n *\r\n * Enable CredSSP client role for the gateway and delegate to the list of servers.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverNames This list of servers where CredSSP should be enabled.\r\n * @param alertId Optional notification Id\r\n */\r\n public enableClientRole(alertTitle: string, serverNames: string[], alertId?: string): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableClientRole,\r\n serverNames: serverNames,\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanDisableClientRole instead.\r\n *\r\n * Disable CredSSP client role for the gateway and remove all delegated servers.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverNames This list of servers where CredSSP should be disabled.\r\n * @param alertId Optional notification Id\r\n */\r\n public disableClientRole(alertTitle: string, serverNames: string[], alertId?: string): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.DisableClientRole,\r\n serverNames,\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanEnableDelegation instead.\r\n *\r\n * Enable the server as a CredSSP server, and enable the gateway as a CredSSP client of the server.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverName The sever where CredSSP delegation should be enabled.\r\n * @param disableTaskDelay Time in hours, for the scheduled that disables CredSSP to wait before being triggered\r\n * @param alertId Optional notification Id\r\n */\r\n public enableDelegation(alertTitle: string, serverName: string, alertId?: string, disableTaskDelay?: number): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('The server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableDelegation,\r\n serverNames: [serverName],\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * This method is obsolete!\r\n *\r\n * Disable the server as a CredSSP server, and disable the gateway as a CredSSP client of the server.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverName The sever where CredSSP delegation should be disabled.\r\n * @param alertId Optional notification Id\r\n */\r\n public disableDelegation(alertTitle: string, serverName: string, alertId?: string): Observable<boolean> {\r\n return of(true);\r\n }\r\n\r\n /**\r\n * The RPC request to the CredSSPManagerShellService.\r\n * @param request The requested CredSSP manager operation\r\n * @param verbose Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @param returnProperty The property of the RPC result object to return\r\n */\r\n private sendRequest<TResult>(request: RpcCredSSPOperation, verbose: boolean, returnProperty: string): Observable<TResult> {\r\n Logging.logDebug(\r\n 'CredSSPManager',\r\n 'Sending request to CredSSPManagerService. Request:{0}'.format(JSON.stringify(request)));\r\n\r\n return from(RpcCredSspRequestClient.credSspRequest(this.rpc, request))\r\n .pipe(\r\n mergeMap(() => this.watcher),\r\n filter(result => result.requestId === request.requestId),\r\n take(1),\r\n mergeMap(result => {\r\n // shell reports 'error' property originated from the CredSSP operation.\r\n // the client using this API should get this error message to display to user.\r\n if (result.error) {\r\n if (verbose) {\r\n const error = new ErrorExtended<{solutionMessage: string}>(result.error);\r\n error.extendedSource = `${request.operation}-credSSPError`;\r\n error.extended = { solutionMessage: result.solutionMessage };\r\n return throwError(error);\r\n } else {\r\n return throwError(new Error(result.error));\r\n }\r\n }\r\n\r\n return of(<TResult>result[returnProperty]);\r\n }));\r\n }\r\n\r\n /**\r\n * Process the RPC response from the CredSSPManagerShellService.\r\n * @param data The requested CredSSP manager operation result.\r\n */\r\n private onRpcResponse(data: RpcCredSSPOperationResult): Promise<any> {\r\n Logging.logDebug(\r\n 'CredSSPManager',\r\n 'Processing response from CredSSPManagerService Response:{0}'.format(JSON.stringify(data)));\r\n\r\n this.watcher.next(data);\r\n\r\n return Promise.resolve();\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../packages/core/security/credssp-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAMH,+BAA+B,EAC/B,uBAAuB,EACvB,qBAAqB,EAExB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAGpF;;GAEG;AACH,MAAM,OAAO,cAAc;IAGvB;;;;OAIG;IACH,YAAoB,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,EAA6B,CAAC;IAC5D,CAAC;IAEM,UAAU;QACb,iCAAiC;QACjC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SACnF;IACL,CAAC;IAED;;;;;OAKG;IACI,wBAAwB,CAAC,UAAkB,EAAE,UAAmB,KAAK;QACxE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AC,EAC5B,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,SAAS,KAAK,OAAO,CAAC,SAAS,CAAC,EACxD,IAAI,CAAC,CAAC,CAAC,EACP,QAAQ,CAAC,MAAM,CAAC,EAAE;YACd,wEAAwE;YACxE,8EAA8E;YAC9E,IAAI,MAAM,CAAC,KAAK,EAAE;gBACd,IAAI,OAAO,EAAE;oBACT,MAAM,KAAK,GAAG,IAAI,aAAa,CAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;oBACzE,KAAK,CAAC,cAAc,GAAG,GAAG,OAAO,CAAC,SAAS,eAAe,CAAC;oBAC3D,KAAK,CAAC,QAAQ,GAAG,EAAE,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC;oBAC7D,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;iBAC5B;qBAAM;oBACH,OAAO,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;iBAC9C;aACJ;YAED,OAAO,EAAE,CAAU,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC;IAED;;;OAGG;IACK,aAAa,CAAC,IAA+B;QACjD,OAAO,CAAC,QAAQ,CACZ,gBAAgB,EAChB,6DAA6D,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAEhG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAExB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;CACJ","file":"credssp-manager.js","sourcesContent":["import { from, Observable, of, Subject, throwError } from 'rxjs';\r\nimport { filter, map, mergeMap, take } from 'rxjs/operators';\r\nimport { ErrorExtended } from '../data/error-extended';\r\nimport { Logging } from '../diagnostics/logging';\r\nimport {\r\n ClientRoleConfiguration,\r\n ConfigurationStatus,\r\n Credentials,\r\n RpcCredSSPOperation,\r\n RpcCredSSPOperationResult,\r\n RpcCredSSPOperationResultMember,\r\n RpcCredSSPOperationType,\r\n RpcCredSspResponseKey,\r\n ServerRoleConfiguration\r\n} from '../rpc/credssp/rpc-credssp-model';\r\nimport { RpcCredSspRequestClient } from '../rpc/credssp/rpc-credssp-request-client';\r\nimport { Rpc } from '../rpc/rpc';\r\n\r\n/**\r\n * CredSPP Manager class. Handles detecting and configuring CredSSP on a set of servers.\r\n */\r\nexport class CredSSPManager {\r\n private watcher: Subject<RpcCredSSPOperationResult>;\r\n\r\n /**\r\n * Initializes a new instance of the Authorization Manager class.\r\n *\r\n * @param rpc The rpc to forward auth requests to a parent window\r\n */\r\n constructor(private rpc: Rpc) {\r\n this.watcher = new Subject<RpcCredSSPOperationResult>();\r\n }\r\n\r\n public initialize() {\r\n // When in Shell do not register.\r\n if (!this.rpc.isShell) {\r\n this.rpc.register(RpcCredSspResponseKey.command, this.onRpcResponse.bind(this));\r\n }\r\n }\r\n\r\n /**\r\n * New Enable CredSSP on the passed in server.\r\n *\r\n * @param serverName This server on which CredSSP should be enabled\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanEnableManagedServer(serverName: string, verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('A server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableManagedServer,\r\n serverNames: [serverName],\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * New Disable CredSSP for the passed in server.\r\n *\r\n * @param serverName This server on which CredSSP should be disabled\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanDisableManagedServer(serverName: string, verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('A server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.DisableManagedServer,\r\n serverNames: [serverName],\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * New Enable CredSSP client role for the gateway and delegate to the list of servers.\r\n *\r\n * @param serverNames This list of servers where CredSSP should be enabled.\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanEnableClientRole(serverNames: string[], verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableClientRole,\r\n serverNames: serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * New Disable CredSSP client role for the gateway and remove all delegated servers.\r\n *\r\n * @param serverNames This list of servers where CredSSP should be disabled\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanDisableClientRole(serverNames: string[], verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.DisableClientRole,\r\n serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * New Enable the server as a CredSSP server, and enable the gateway as a CredSSP client of the server.\r\n *\r\n * @param serverName The server where CredSSP delegation should be enabled\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n */\r\n public wsmanEnableDelegation(serverName: string, verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('The server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableDelegation,\r\n serverNames: [serverName],\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * Test WSMan CredSSP connection from gateway to server(s)\r\n *\r\n * @param serverNames the servers to test connection to from gateway\r\n * @param credentials explicit credentials(username and password) to be used to WSMan CredSSP test\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @returns true if we can safely connect to all server without isssues otherwise returns false\r\n */\r\n public testCredSSP(serverNames: string[], credentials: Credentials, verbose: boolean = false): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames.length || serverNames.some(\r\n serverName => MsftSme.isNullOrWhiteSpace(serverName))\r\n ) {\r\n throw new Error('The server name(s) must be provided.');\r\n }\r\n\r\n if (!credentials || !credentials.username || !credentials.password) {\r\n throw new Error('Username and password must be provided in the options.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.TestCredSSP,\r\n serverNames: serverNames,\r\n credentials,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * Get the CredSSP client role configuration of the gateway, including:\r\n * 1. Client role of gateway to delegate fresh credentials\r\n * 2. Which servers can be delegated fresh credentials\r\n *\r\n * @param serverNames The list of servers to check credential delegation status\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @returns ClientRoleConfiguration object of the gateway client role configuration\r\n */\r\n public wsmanGetClientConfigurationOnGateway(serverNames: string[], verbose: boolean = false): Observable<ClientRoleConfiguration> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<ConfigurationStatus>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.ConfirmClientConfiguration,\r\n serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.ConfigurationStatus).pipe(map(response => response.client));\r\n }\r\n\r\n /**\r\n * Get the CredSSP server role configuration of the server.\r\n *\r\n * @param serverName The server to get the CredSSP configuration\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @returns ServerRoleConfiguration object of the managed server server role configuration\r\n */\r\n public wsmanGetManagedServerConfiguration(serverNames: string[], verbose: boolean = false): Observable<ServerRoleConfiguration[]> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<ConfigurationStatus>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.ConfirmManagedServerConfiguration,\r\n serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.ConfigurationStatus).pipe(map(response => <ServerRoleConfiguration[]>response.servers));\r\n }\r\n\r\n /**\r\n * Get the CredSSP delegation configuration, including:\r\n * 1. Client role of gateway to delegate fresh credentials\r\n * 2. Which servers can be delegated fresh credentials\r\n * 3. Server roles of each servers\r\n *\r\n * @param serverNames The list of servers to check credential delegation from gateway and to check server role status\r\n * @param verbose (Optional) Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @returns ConfigurationData object of the client and server role configuation\r\n */\r\n public wsmanGetDelegationConfiguration(serverNames: string[], verbose: boolean = false): Observable<ConfigurationStatus> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<ConfigurationStatus>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.ConfirmDelegation,\r\n serverNames,\r\n notificationTitle: null,\r\n notificationId: null\r\n }, verbose, RpcCredSSPOperationResultMember.ConfigurationStatus);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanEnableManagedServer instead.\r\n *\r\n * Enable CredSSP on the passed in server.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverName This server on which CredSSP should be enabled\r\n * @param alertId Optional notification Id\r\n */\r\n public enableManagedServer(alertTitle: string, serverName: string, alertId?: string): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('A server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableManagedServer,\r\n serverNames: [serverName],\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanDisableManagedServer instead.\r\n *\r\n * Disable CredSSP for the passed in server.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverName This server on which CredSSP should be disabled\r\n * @param alertId Optional notification Id\r\n */\r\n public disableManagedServer(alertTitle: string, serverName: string, alertId?: string): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('A server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.DisableManagedServer,\r\n serverNames: [serverName],\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanEnableClientRole instead.\r\n *\r\n * Enable CredSSP client role for the gateway and delegate to the list of servers.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverNames This list of servers where CredSSP should be enabled.\r\n * @param alertId Optional notification Id\r\n */\r\n public enableClientRole(alertTitle: string, serverNames: string[], alertId?: string): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableClientRole,\r\n serverNames: serverNames,\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanDisableClientRole instead.\r\n *\r\n * Disable CredSSP client role for the gateway and remove all delegated servers.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverNames This list of servers where CredSSP should be disabled.\r\n * @param alertId Optional notification Id\r\n */\r\n public disableClientRole(alertTitle: string, serverNames: string[], alertId?: string): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (!serverNames || serverNames.length < 1) {\r\n throw new Error('At least one server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.DisableClientRole,\r\n serverNames,\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n\r\n /**\r\n * @deprecated\r\n * Notification message wouldn't be displayed from this call. Display the notification by own code,\r\n * and use wsmanEnableDelegation instead.\r\n *\r\n * Enable the server as a CredSSP server, and enable the gateway as a CredSSP client of the server.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverName The sever where CredSSP delegation should be enabled.\r\n * @param disableTaskDelay Time in hours, for the scheduled that disables CredSSP to wait before being triggered\r\n * @param alertId Optional notification Id\r\n */\r\n public enableDelegation(alertTitle: string, serverName: string, alertId?: string, disableTaskDelay?: number): Observable<boolean> {\r\n if (this.rpc.isShell) {\r\n throw new Error('Not supported on the shell environment.');\r\n }\r\n\r\n if (MsftSme.isNullOrWhiteSpace(serverName)) {\r\n throw new Error('The server name must be provided.');\r\n }\r\n\r\n return this.sendRequest<boolean>({\r\n requestId: MsftSme.getUniqueId(),\r\n operation: RpcCredSSPOperationType.EnableDelegation,\r\n serverNames: [serverName],\r\n notificationTitle: alertTitle,\r\n notificationId: alertId\r\n }, false, RpcCredSSPOperationResultMember.Succeeded);\r\n }\r\n\r\n /**\r\n * @deprecated\r\n * This method is obsolete!\r\n *\r\n * Disable the server as a CredSSP server, and disable the gateway as a CredSSP client of the server.\r\n *\r\n * @param alertTitle Title for notifications raised by this servers. Should be contextual to the scenario that is using this service\r\n * @param serverName The sever where CredSSP delegation should be disabled.\r\n * @param alertId Optional notification Id\r\n */\r\n public disableDelegation(alertTitle: string, serverName: string, alertId?: string): Observable<boolean> {\r\n return of(true);\r\n }\r\n\r\n /**\r\n * The RPC request to the CredSSPManagerShellService.\r\n * @param request The requested CredSSP manager operation\r\n * @param verbose Specify whether a solution (if any) should be returned if CredSSP errored\r\n * @param returnProperty The property of the RPC result object to return\r\n */\r\n private sendRequest<TResult>(request: RpcCredSSPOperation, verbose: boolean, returnProperty: string): Observable<TResult> {\r\n Logging.logDebug(\r\n 'CredSSPManager',\r\n 'Sending request to CredSSPManagerService. Request:{0}'.format(JSON.stringify(request)));\r\n\r\n return from(RpcCredSspRequestClient.credSspRequest(this.rpc, request))\r\n .pipe(\r\n mergeMap(() => this.watcher),\r\n filter(result => result.requestId === request.requestId),\r\n take(1),\r\n mergeMap(result => {\r\n // shell reports 'error' property originated from the CredSSP operation.\r\n // the client using this API should get this error message to display to user.\r\n if (result.error) {\r\n if (verbose) {\r\n const error = new ErrorExtended<{solutionMessage: string}>(result.error);\r\n error.extendedSource = `${request.operation}-credSSPError`;\r\n error.extended = { solutionMessage: result.solutionMessage };\r\n return throwError(error);\r\n } else {\r\n return throwError(new Error(result.error));\r\n }\r\n }\r\n\r\n return of(<TResult>result[returnProperty]);\r\n }));\r\n }\r\n\r\n /**\r\n * Process the RPC response from the CredSSPManagerShellService.\r\n * @param data The requested CredSSP manager operation result.\r\n */\r\n private onRpcResponse(data: RpcCredSSPOperationResult): Promise<any> {\r\n Logging.logDebug(\r\n 'CredSSPManager',\r\n 'Processing response from CredSSPManagerService Response:{0}'.format(JSON.stringify(data)));\r\n\r\n this.watcher.next(data);\r\n\r\n return Promise.resolve();\r\n }\r\n}\r\n"]}
|
|
@@ -24,16 +24,6 @@ export declare enum GatewayMode {
|
|
|
24
24
|
*/
|
|
25
25
|
App = 3
|
|
26
26
|
}
|
|
27
|
-
export declare enum GatewayOperationalMode {
|
|
28
|
-
/**
|
|
29
|
-
* Indicates the Gateway is running in production mode
|
|
30
|
-
*/
|
|
31
|
-
Production = 0,
|
|
32
|
-
/**
|
|
33
|
-
* Indicates the Gateway is running in development mode
|
|
34
|
-
*/
|
|
35
|
-
Development = 1
|
|
36
|
-
}
|
|
37
27
|
/**
|
|
38
28
|
* Windows admin center Installation Types
|
|
39
29
|
*/
|
|
@@ -16,17 +16,6 @@ export var GatewayMode;
|
|
|
16
16
|
*/
|
|
17
17
|
GatewayMode[GatewayMode["App"] = 3] = "App";
|
|
18
18
|
})(GatewayMode || (GatewayMode = {}));
|
|
19
|
-
export var GatewayOperationalMode;
|
|
20
|
-
(function (GatewayOperationalMode) {
|
|
21
|
-
/**
|
|
22
|
-
* Indicates the Gateway is running in production mode
|
|
23
|
-
*/
|
|
24
|
-
GatewayOperationalMode[GatewayOperationalMode["Production"] = 0] = "Production";
|
|
25
|
-
/**
|
|
26
|
-
* Indicates the Gateway is running in development mode
|
|
27
|
-
*/
|
|
28
|
-
GatewayOperationalMode[GatewayOperationalMode["Development"] = 1] = "Development";
|
|
29
|
-
})(GatewayOperationalMode || (GatewayOperationalMode = {}));
|
|
30
19
|
/**
|
|
31
20
|
* Windows admin center Installation Types
|
|
32
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../packages/core/shared/gateway-inventory/gateway-inventory.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,CAAN,IAAY,WAeX;AAfD,WAAY,WAAW;IACnB;;OAEG;IACH,mDAAW,CAAA;IAEX;;OAEG;IACH,mDAAO,CAAA;IAEP;;OAEG;IACH,2CAAG,CAAA;AACP,CAAC,EAfW,WAAW,KAAX,WAAW,QAetB;AAED
|
|
1
|
+
{"version":3,"sources":["../../../packages/core/shared/gateway-inventory/gateway-inventory.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,CAAN,IAAY,WAeX;AAfD,WAAY,WAAW;IACnB;;OAEG;IACH,mDAAW,CAAA;IAEX;;OAEG;IACH,mDAAO,CAAA;IAEP;;OAEG;IACH,2CAAG,CAAA;AACP,CAAC,EAfW,WAAW,KAAX,WAAW,QAetB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,uBAUX;AAVD,WAAY,uBAAuB;IAC/B;;OAEG;IACH,gEAAqC,CAAA;IAErC;;OAEG;IACH,gDAAqB,CAAA;AACzB,CAAC,EAVW,uBAAuB,KAAvB,uBAAuB,QAUlC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAeX;AAfD,WAAY,eAAe;IACvB;;OAEG;IACH,wCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAmB,CAAA;IAEnB;;OAEG;IACH,oCAAiB,CAAA;AACrB,CAAC,EAfW,eAAe,KAAf,eAAe,QAe1B;AA6ED;;GAEG;AACH,MAAM,OAAO,gBAAgB;IA4EzB;;;;OAIG;IACH,YAAY,IAA2B;QACnC,IAAI,IAAI,EAAE;YACN,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAC7B;IACL,CAAC;CACJ","file":"gateway-inventory.js","sourcesContent":["/**\r\n * Gateway Inventory query parameters.\r\n */\r\nexport interface GatewayInventoryParams {\r\n /**\r\n * no control of auth handling if set true.\r\n */\r\n noAuth?: boolean;\r\n}\r\n\r\n/**\r\n * The mode that the gateway is running as.\r\n */\r\nexport enum GatewayMode {\r\n /**\r\n * Indicates the Gateway is running as a service\r\n */\r\n Service = 1,\r\n\r\n /**\r\n * Indicates the Gateway is running as a desktop application\r\n */\r\n Desktop,\r\n\r\n /**\r\n * Indicates the Gateway is running as a UWP application\r\n */\r\n App\r\n}\r\n\r\n/**\r\n * Windows admin center Installation Types\r\n */\r\nexport enum GatewayInstallationType {\r\n /**\r\n * Indicating installation type as an azure vm extension\r\n */\r\n AzureVmExtension = 'AzureVmExtension',\r\n\r\n /**\r\n * Standard installation type\r\n */\r\n Standard = 'Standard'\r\n}\r\n\r\n/**\r\n * Windows Admin Center connection type\r\n */\r\nexport enum ConnectionsType {\r\n /**\r\n * Standard connection type. WAC will show connection list upon connecting\r\n */\r\n Standard = 'standard',\r\n\r\n /**\r\n * Indicates connecting to a cluster on Azure Portal. WAC will lock to Cluster Manager view.\r\n */\r\n Cluster = 'cluster',\r\n\r\n /**\r\n * Indicates connecting to a server on Azure Portal. WAC will lock to Server Manager view.\r\n */\r\n Server = 'server'\r\n}\r\n\r\n/**\r\n * Gateway Inventory data interface.\r\n */\r\nexport interface GatewayInventoryData {\r\n /**\r\n * The available memory in MBytes.\r\n */\r\n availableMemoryMByte: number;\r\n\r\n /**\r\n * The working set of gateway process.\r\n */\r\n gatewayWorkingSetMByte: number;\r\n\r\n /**\r\n * The total cpu utilization.\r\n */\r\n totalCpuUtilizationPercent: number;\r\n\r\n /**\r\n * The gateway cpu utilization.\r\n */\r\n gatewayCpuUtilizationPercent: number;\r\n\r\n /**\r\n * The gateway version.\r\n */\r\n gatewayVersion: string;\r\n\r\n /**\r\n * The gateway display version.\r\n */\r\n gatewayDisplayVersion: string;\r\n\r\n /**\r\n * The friendly OS name.\r\n */\r\n friendlyOsName: string;\r\n\r\n /**\r\n * The msi installed date.\r\n */\r\n installedDate: string;\r\n\r\n /**\r\n * The logical processor count.\r\n */\r\n logicalProcessorCount: number;\r\n\r\n /**\r\n * The gateway name.\r\n */\r\n name: string;\r\n\r\n /**\r\n * The mode that the gateway is running as.\r\n */\r\n mode: GatewayMode;\r\n\r\n /**\r\n * The status of gateway process - if it is running elevated or not.\r\n */\r\n isGatewayProcessElevated: boolean;\r\n\r\n /**\r\n * The installation type of Windows Admin Center\r\n */\r\n installationType: string;\r\n\r\n /**\r\n * The origins allowed by the gateway to host windows admin center in an iframe or other window context\r\n */\r\n allowedHostOrigins: string[];\r\n}\r\n\r\n/**\r\n * Gateway Inventory class.\r\n */\r\nexport class GatewayInventory implements GatewayInventoryData {\r\n /**\r\n * The available memory in MBytes.\r\n */\r\n public availableMemoryMByte: number;\r\n\r\n /**\r\n * The working set of gateway process.\r\n */\r\n public gatewayWorkingSetMByte: number;\r\n\r\n /**\r\n * The total cpu utilization.\r\n */\r\n public totalCpuUtilizationPercent: number;\r\n\r\n /**\r\n * The gateway cpu utilization.\r\n */\r\n public gatewayCpuUtilizationPercent: number;\r\n\r\n /**\r\n * The gateway version.\r\n */\r\n public gatewayVersion: string;\r\n\r\n /**\r\n * The gateway display version.\r\n */\r\n public gatewayDisplayVersion: string;\r\n\r\n /**\r\n * The friendly OS name.\r\n */\r\n public friendlyOsName: string;\r\n\r\n /**\r\n * The msi installed date.\r\n */\r\n public installedDate: string;\r\n\r\n /**\r\n * The logical processor count.\r\n */\r\n public logicalProcessorCount: number;\r\n\r\n /**\r\n * The gateway name.\r\n */\r\n public name: string;\r\n\r\n /**\r\n * The mode that the gateway is running as.\r\n */\r\n public mode: GatewayMode;\r\n\r\n /**\r\n * The status of gateway process - if it is running elevated or not.\r\n */\r\n public isGatewayProcessElevated: boolean;\r\n\r\n /**\r\n * JWK - JSON Web Key to encrypt password data.\r\n */\r\n public jwk: string;\r\n\r\n /**\r\n * The installation type of Windows Admin Center\r\n */\r\n public installationType: string;\r\n\r\n /**\r\n * The origins allowed by the gateway to host windows admin center in an iframe or other window context\r\n */\r\n public allowedHostOrigins: string[];\r\n\r\n /**\r\n * Initializes a new instance of the GatewayInventory Class.\r\n *\r\n * @param data the server inventory recovered data.\r\n */\r\n constructor(data?: GatewayInventoryData) {\r\n if (data) {\r\n Object.assign(this, data);\r\n }\r\n }\r\n}\r\n"]}
|