You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a notice to the Database/Service/Web setup pages for CCM informing
users about the change to CCM's connection strings, with information on
what to do if they want a _completely_ secure connection to the SQL
Server instance.
As of Chocolatey Central Management v0.13.0, the SQL connection mode has changed to secure-by-default. By default, all connection strings will assume `Encrypt=true;` and attempt a connection to the SQL Server over SSL. If you wish to disable this, you must pass a complete connection string to the `/ConnectionString` package parameter that contains an explicit `Encrypt=false;` parameter.
9
+
10
+
To accommodate this new default, the package installation will automatically add the `TrustServerCertificate=True` parameter to the connection string it constructs or receives if the initial connection to the SQL server fails without it.
11
+
12
+
If you would like to ensure a completely secure SQL connection, you must [install a trusted SSL Certificate on the SQL Server instance](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/manage-certificates?view=sql-server-ver16) before installing, upgrading, or reinstalling Chocolatey Central Management packages.
13
+
If you have already installed v0.13.0 or later versions of Chocolatey Central Management, you will need to explicitly pass the SQL connection package parameters when upgrading or reinstalling in order to ensure the connection is established in a fully secure mode.
At the end of this, we should have a fully ready to go SQL Server:
15
16
@@ -165,7 +166,7 @@ The Chocolatey Central Management database package will add or update a database
165
166
166
167
### Package Parameters
167
168
168
-
*`/ConnectionString:` - The SQL Server database connection string to be used to connect to the Chocolatey Central Management database. Defaults to default or explicit values for `/SqlServiceInstance` and `/Database`, along with Integrated Security (`Server=<LOCAL COMPUTER FQDN NAME>; Database=ChocolateyManagement; Trusted_Connection=True;`). The account should have `db_owner` access to the database ([database owner](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles#fixed-database-roles)).
169
+
*`/ConnectionString:` - The SQL Server database connection string to be used to connect to the Chocolatey Central Management database. By default, this value is constructed from the default or explicit values for `/SqlServiceInstance` and `/Database`, and uses Integrated Security (with all default values, this value will look like the following: `Server=<LOCAL COMPUTER FQDN NAME>; Database=ChocolateyManagement; Trusted_Connection=True; TrustServerCertificate=True;`). The account should have [`db_owner`](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles#fixed-database-roles) access to the database.
169
170
*`/SqlServerInstance:` - Instance name of the SQL Server database to connect to. Alternative to passing full connection string with `/ConnectionString`. Uses `/Database` (below) to build a connection string. Defaults to `<LOCAL COMPUTER FQDN NAME>`.
170
171
*`/Database:` - Name of the SQL Server database to use. Alternative to passing full connection string with `/ConnectionString`. Uses `/SqlServerInstance` (above) to build a connection string. Defaults to `ChocolateyManagement`.
171
172
*`/SkipDatabasePermissionCheck` - By default, a check will be completed to ensure that the installing user has access to create a new database, based on the provided/computed connection string. If this check isn't required, for example, the database has already been created or permissions will error, this step can be skipped using this parameter. Available with CCM v0.2.0+.
@@ -176,6 +177,8 @@ The Chocolatey Central Management database package will add or update a database
176
177
177
178
### Database Authentication Scenarios
178
179
180
+
<CentralManagementSecureConnectionStrings />
181
+
179
182
* <Xreftitle="Scenario 1 - Windows Authentication to Local SQL Server"value="ccm-database"anchor="scenario-one" />
180
183
* <Xreftitle="Scenario 2 - Active Directory Authentication to Remote SQL Server"value="ccm-database"anchor="scenario-two" />
181
184
* <Xreftitle="Scenario 3 - SQL Server Authentication to Local SQL Server"value="ccm-database"anchor="scenario-three" />
@@ -241,9 +244,9 @@ export const tabs1 = [
241
244
</Callout>
242
245
243
246
<Callouttype="warning">
244
-
**Installs**: Please ensure the user running the package installation is able to create databases unless you also pass `/SkipDatabasePermissionCheck` (in that case you simply need `db_owner` to the database being managed if it was pre-created).
245
-
246
-
**Upgrades**: Please ensure the user running the package installation has been granted `db_owner` access to an existing database.
247
+
**Installation**: Please either ensure the user running the package installation is able to create databases or pass `/SkipDatabasePermissionCheck`, if you have `db_owner`permission to the pre-created database.
248
+
249
+
**Upgrade**: Please ensure the user running the package installation has been granted `db_owner` access to the existing database.
247
250
</Callout>
248
251
</TabsPane>
249
252
<TabsPanecontent={tabs1[2]}>
@@ -291,9 +294,9 @@ export const tabs1 = [
291
294
</Callout>
292
295
293
296
<Callouttype="warning">
294
-
**Installs**: Please ensure the login credentials provided are able to create databases unless you also pass `/SkipDatabasePermissionCheck` (in that case you simply need `db_owner` to the database being managed if it was pre-created).
295
-
296
-
**Upgrades**: Please ensure the login credentials provided have been given`db_owner` access to an existing database.
297
+
**Installation**: Please either ensure the user running the package installation is able to create databases or pass `/SkipDatabasePermissionCheck`, if you have `db_owner`permission to the pre-created database.
298
+
299
+
**Upgrade**: Please ensure the user running the package installation has been granted`db_owner` access to the existing database.
297
300
</Callout>
298
301
</TabsPane>
299
302
</TabsPaneContainer>
@@ -419,12 +422,12 @@ Chocolatey Central Management has specific compatibility requirements with quite
419
422
420
423
### What is the minimum required configuration for the appsettings.json file?
421
424
422
-
As of Chocolatey Central Management v0.6.2, the default settings in the `appsettings.json` for the database package are:
425
+
As of Chocolatey Central Management v0.13.0, the default settings in the `appsettings.json` for the database package are:
This is the service that the agents (`chocolatey-agent`) communicates with. You could install one or more of these depending on the size of your environment (not multiple on one machine though). The FQDN and certificate used determine what the URL will be for the agents to check into Chocolatey Central Management.
15
16
@@ -72,7 +73,7 @@ Note items with "`:`" mean a value should be provided. Items without are simply
72
73
*`/PortNumber:` - The port the Chocolatey Management Service will listen on. This will automatically create a rule to open the firewall on the port specified. Defaults to `24020`.
73
74
*`/CertificateDnsName:` - The DNS name of the self-signed certificate that is generated if no existing certificate thumbprint is provided using the `/CertificateThumbprint` parameter (below). Defaults to `<LOCAL COMPUTER FQDN NAME>`.
74
75
*`/CertificateThumbprint:` - Provide the thumbprint of an existing certificate (already installed in `LocalMachine\TrustedPeople` certificate store) to use for secure communication with clients. Defaults to a new self-signed SSL certificate on first installation / reuses existing on upgrades.
75
-
*`/ConnectionString:` - The SQL Server database connection string to be used to connect to the Chocolatey Central Management database. Defaults to default or explicit values for `/SqlServiceInstance` and `/Database`, along with Integrated Security (`Server=<LOCAL COMPUTER FQDN NAME>; Database=ChocolateyManagement; Trusted_Connection=True;`). The account should have `db_datareader`/`db_datawriter` access to the database ([data reader / data writer](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles#fixed-database-roles)).
76
+
*`/ConnectionString:` - The SQL Server database connection string to be used to connect to the Chocolatey Central Management database. By default, this value is constructed from the default or explicit values for `/SqlServiceInstance` and `/Database`, and uses Integrated Security (with all default values, this value will look like the following: `Server=<LOCAL COMPUTER FQDN NAME>; Database=ChocolateyManagement; Trusted_Connection=True; TrustServerCertificate=True;`). The account should have [`db_datareader`/`db_datawriter`](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles#fixed-database-roles) access to the database.
76
77
*`/SqlServerInstance:` - Instance name of the SQL Server database to connect to. Alternative to passing full connection string with `/ConnectionString`. Uses `/Database` (below) to build a connection string. Defaults to `<LOCAL COMPUTER FQDN NAME>`.
77
78
*`/Database:` - Name of the SQL Server database to use. Alternative to passing full connection string with `/ConnectionString`. Uses `/SqlServerInstance` (above) to build a connection string. Defaults to `ChocolateyManagement`.
78
79
@@ -128,6 +129,8 @@ When Chocolatey manages the password for a local Administrator, it creates a ver
128
129
129
130
### Database Authentication Scenarios
130
131
132
+
<CentralManagementSecureConnectionStrings />
133
+
131
134
* <Xreftitle="Scenario 1 - Windows Authentication to Local SQL Server"value="ccm-service"anchor="scenario-one" />
132
135
* <Xreftitle="Scenario 2 - Active Directory Authentication to Remote SQL Server"value="ccm-service"anchor="scenario-two" />
133
136
* <Xreftitle="Scenario 3 - SQL Server Authentication to Local SQL Server"value="ccm-service"anchor="scenario-three" />
@@ -252,12 +255,12 @@ This situation can occur with any version of Chocolatey Central Management up to
252
255
253
256
### What is the minimum required configuration for the `appsettings.json` file?
254
257
255
-
As of Chocolatey Central Management v0.6.2, the default configuration values in the `appsettings.json` for the Chocolatey Central Management service are:
258
+
As of Chocolatey Central Management v0.13.0, the default configuration values in the `appsettings.json` for the Chocolatey Central Management service are:
@@ -468,12 +471,13 @@ You may also receive a differently-worded error if the certificate used by the C
468
471
Starting in Chocolatey Central Management v0.6.2, the Chocolatey Central Management Service package will attempt to select an appropriate certificate during installation, and store the thumbprint in the `appsettings.json` file.
469
472
You can also specify the thumbprint for the certificate to use as the `/CertificateThumbprint` package parameter during installation or upgrade.
470
473
471
-
If you need to change the certificate you're using after installation, you can modify the entry in the `appsettings.json` file for the Chocolatey Central Management service, shown below.
474
+
If you need to change the certificate you're using after installation, you can modify the entry in the `appsettings.json` file for the Chocolatey Central Management service.
475
+
Below is a sample of what the `appsettings.json` file looks like by default as of Chocolatey Central Management v0.13.0.
This is the Chocolatey Central Management website that gives an API and a web layer to centrally manage information about your environment and manage endpoints with deployment tasks.
16
17
@@ -59,7 +60,7 @@ Note items with "`:`" mean a value should be provided. Items without are simply
59
60
</Callout>
60
61
*`/Password:` - Password for the user. Defaults to a Windows autogenerated secure password for the IIS AppPool.
61
62
*`/EnterPassword` - Receive the password at runtime as a secure string. Requires input at runtime whe installing/upgrading the package.
62
-
*`/ConnectionString:` - The SQL Server database connection string to be used to connect to the Chocolatey Central Management database. Defaults to default or explicit values for `/SqlServiceInstance` and `/Database`, along with Integrated Security (`Server=<LOCAL COMPUTER FQDN NAME>; Database=ChocolateyManagement; Trusted_Connection=True;`). The account should have `db_datareader`/`db_datawriter` access to the database ([data reader / data writer](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles#fixed-database-roles)).
63
+
*`/ConnectionString:` - The SQL Server database connection string to be used to connect to the Chocolatey Central Management database. By default, this value is constructed from the default or explicit values for `/SqlServiceInstance` and `/Database`, and uses Integrated Security (with all default values, this value will look like the following: `Server=<LOCAL COMPUTER FQDN NAME>; Database=ChocolateyManagement; Trusted_Connection=True; TrustServerCertificate=True;`). The account should have [`db_datareader`/`db_datawriter`](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles#fixed-database-roles) access to the database.
63
64
*`/SqlServerInstance:` - Instance name of the SQL Server database to connect to. Alternative to passing full connection string with `/ConnectionString`. Uses `/Database` (below) to build a connection string. Defaults to `<LOCAL COMPUTER FQDN NAME>`.
64
65
*`/Database:` - Name of the SQL Server database to use. Alternative to passing full connection string with `/ConnectionString`. Uses `/SqlServerInstance` (above) to build a connection string. Defaults to `ChocolateyManagement`.
65
66
@@ -91,6 +92,8 @@ This includes (but may not be limited to):
91
92
92
93
### Database Authentication Scenarios
93
94
95
+
<CentralManagementSecureConnectionStrings />
96
+
94
97
* <Xreftitle="Scenario 1 - Windows Authentication to Local SQL Server"value="ccm-website"anchor="scenario-one" />
95
98
* <Xreftitle="Scenario 2 - Active Directory Authentication to Remote SQL Server"value="ccm-website"anchor="scenario-two" />
96
99
* <Xreftitle="Scenario 3 - SQL Server Authentication to Local SQL Server"value="ccm-website"anchor="scenario-three" />
@@ -272,7 +275,7 @@ Here is a copy of items that can be set. They are not required to be encrypted.
0 commit comments