Merge pull request #166 from jpogran/ticket/master/PA-285-branding-na…
…me-change (PA-285) Branding name change
Merge pull request #181 from MosesMendoza/MODULES-3640/windows/add_js…
…on_pure_restriction (MODULES-3640) Update modulesync 30fc4ab
* stable: (MODULES-3640) Update modulesync 30fc4ab (MODULES-3493) Release 1.1.3
(MODULES-3427) Allow multiple SYSADMIN role accounts
- Previously there was a bug in the way the module constructed the command line to install SQL server with multiple SA role accounts. Each additional account should be a separate command line parameter instead of combining all accounts into a single parameter. This commit changes how the command line arguments are constructed so that each admin account has its own element in the command line argument array. This commit also modifies the spec tests to ensure this behavior is used.
* pr/180: (MODULES-3427) Allow multiple SYSADMIN role accounts closes #180
(MODULES-3256) Fix create/delete of Windows based logins
Previously the module would fail to create and delete windows based logins due to the TSQL scripts querying the `SQL_LOGINS` table. This table only lists SQL logins, not Windows logins. Instead the `SERVER_PRINCIPALS` table is used to determine login existance and correctness. This commit also modifies how Windows Group logins are disabled. Groups can not be disabled, they can only be denied to connect to the database. This requires the use the GRAND/REVOKE server permissions table. This commit detects the state of the login using the `server_permissions` table.
(MODULES-3202) Fix install dependencies with custom source
Previously the SQL Server module would try to install .Net Framework 3.5 from a custom source, however the source was never exposed on the feature or instance provider and type. This commit: - Adds a new parameter to the feature and instance type called `windows_feature_source` which can be used to set the `/Source` attriute during a call to DISM. See https://support.microsoft.com/en-us/kb/2734782 for more information about installing from a custom source - Modifies the installation logic so that it only calls DISM once if the feature exists. Previously it was called three times. - Documents the new parameter to the README - Adds the missing `source` parameter to the feature type in the README - Only adds the `/Source` parameter to the DISM call, if it is specified in the resource - Modifies the error message to only mentioned the windows_source_location if it was specified in the resource - Removed redundant call to Install-WindowsFeature
(MODULES-2323) Fix deleting an SQL login
Previously when attempting to remove a login from an MS SQL Server, a TSQL error was thrown. This is due to the `GO` statement in the template. `GO` is not a TSQL statement, it is actually a command interpretted by a client, such as sqlcmd.exe. This commit changes the template to use only TSQL statements and uses the `DROP LOGIN` command as the `sp_droplogin` stored procedure has been deprecated. This commit re-instates the login deletion after each login acceptance test. Ref: https://msdn.microsoft.com/en-us/library/ms189767.aspx
(MODULES-2554) Fix remove database
Previously when attempting to remove a database from an MS SQL Server, a TSQL error was thrown. This is due to the `GO` statement in the template. `GO` is not a TSQL statement, it is actually a command interpretted by a TSQL client, such as sqlcmd.exe. This commit changes the database delete template to use only TSQL statements and terminate with a semi-colon. This change also reinstates the database deletion in the login_spec and database_spec acceptance tests.
(MODULES-3256) Refactor sqlserver_login_spec acceptance test
Previously the acceptance test for the sqlserver::login resource was only testing a portion of the functionality. This commit refactors the test suite and adds the following tests; - Adds Windows user and group logins to the test suite - Removes test fixtures for login, database and windows principals on completion - Parameterizes the manifest generation - Tests creating a resource as well as modifying an existing resource - Tests deleting a sqlserver::login resource - Tests disabling a resource - Fixes testing errors where it was using a disabled account for db access - Added function to query the database as `sa` account
(MODULES-3256) Fix creating a login resource with additional attributes
Previously when creating a login in a SQL Server it would take to puppet runs to complete the configuration. This is due to the ordering of actions in the `create/login.sql.rb` template. It would only modify a login if it already existed. This commit changes the logic of the script to create the login if it does not exist and then modify the login with the correct attributes.
(MODULES-3083) Fix modifying server roles for an existing login
Previously when modifying the assigned server roles for a login it would generate a TSQL error. This was due to not escaping the role names correctly with square brackets. This commit modifies the login template and adds acceptance tests for this scenario.
Merge pull request #182 from glennsarti/ticket/master/MODULES-3256-fi…
…x-login (MODULES-3256)(MODULES-2323)(MODULES-2554)(MODULES-3083) Fix sqlserver::login resource
(BKR-914) Add workaround for beaker bug BKR-914
The Windows 2012 R2 VMPooler templates were recently updated due to the older
version not populating environment variables correctly. However this exposed an
issue in Beaker (BKR-914) whereby it's `get_env_var` function was far too loose
in its pattern matching causing multiple lines to be returned for a single env
var. This then caused newline characters to be injected into the
`~/.ssh/environment` file, which then poluted calls to STDOUT and subsequently
any tests that depended on parsing STDOUT could potentially fail.
This commit adds workarounds to this issue until BKR-914 is fixed and published.
- The output from a `get_env_var` is sanitised and if required, additional regex
is injected to get the required effect from the `env | grep #{key}` call in
Beaker
- An existance check is added so that the CommonProgramFiles env var is only
added if it does not exist. This avoids modifying the environment
unncessarily.
This commit can be partially revertted once BKR-914 is resolved and published.Merge pull request #184 from glennsarti/ticket/master/MODULES-3256-fi…
…x-login (BKR-914) Add workaround for beaker bug BKR-914
(MODULES-3752) Fix modifying server_roles for an existing WINDOWS_LOGIN
Previously the SQL template for modifying a login and the associated acceptance tests were using the IS_SRVROLEMEMBER function to determine membership. However this function has many caveats e.g. failing for domain principals if a domain controller is not contactable, and always return false for a disabled Windows user login. This commit changes the check to use the `sys.server_role_members` table which holds the underlying membership information.
Merge pull request #185 from glennsarti/ticket/master/MODULES-3256-fi…
…x-login (MODULES-3752) Fix modifying server_roles for an existing WINDOWS_LOGIN
Merge pull request #183 from glennsarti/ticket/master/MODULES-3202-fi…
…x-dism-source (MODULES-3202) Fix install dependencies with custom source
Merge pull request #187 from glennsarti/ticket/stable/modsync
(maint) modulesync 70360747
Merge branch 'master' into stable
* master: (MODULES-3752) Fix modifying server_roles for an existing WINDOWS_LOGIN (BKR-914) Add workaround for beaker bug BKR-914 (MODULES-3083) Fix modifying server roles for an existing login (MODULES-3256) Fix creating a login resource with additional attributes (MODULES-3256) Refactor sqlserver_login_spec acceptance test (MODULES-2554) Fix remove database (MODULES-2323) Fix deleting an SQL login (MODULES-3202) Fix install dependencies with custom source (MODULES-3256) Fix create/delete of Windows based logins (MODULES-3427) Allow multiple SYSADMIN role accounts (PA-285) Branding name change
(MODULES-3775) (msync 8d0455c) update travis/appveyer w/Ruby 2.3
Merge pull request #188 from MosesMendoza/MODULES-3775/stable/update_…
…appveyor_travis_to_ruby_23 (MODULES-3775) (msync 8d0455c) update travis/appveyer w/Ruby 2.3
This commit prepares the module for module release 1.1.4 [ci skip]
Merge pull request #186 from glennsarti/ticket/master/FM-5473-release…
…-1.1.4 (FM-5473) Release 1.1.4
(FM-5476) (docs) Edits for docs signoff.
- Clarify changelog entries regarding bugs. - Consistently capitalize ".NET" in the changelog and readme. - Make Markdown line spacing in the changelog more consistent. - Add commas to an unclear list in the changelog. - Consistently use sentence case in readme headings. - Consistently add one space between heading text and markup. - Consistently use two-space indents in Puppet code blocks. - Consistently space names from brackets in Puppet code blocks. - Consistently align hash rockets in Puppet code blocks. - Fix an unclosed Markdown code backtick. - Update a couple link URLs to more specific destinations. - Fix spelling, grammar, and spacing errors.
Merge pull request #189 from gguillotte/docs-signoff-edits
(FM-5476) (docs) Edits for docs signoff