dsccommunity / dsccommunity/SqlServerDsc
SqlLogin: Resource refactoring proposal
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
Resource proposal
A class-based SqlLogin resource would ensure SQL Server logins exist, are enabled or disabled, and have correct properties. Commands would include Get-SqlDscLogin, New-SqlDscLogin, Remove-SqlDscLogin, Enable-SqlDscLogin, Disable-SqlDscLogin, and Test-SqlDscIsLoginEnabled.
Proposed properties
| Property | Type qualifier | Data type | Description | Default value | Allowed values |
|---|---|---|---|---|---|
| Ensure | Key | String | Whether the login should be Present or Absent | Present | Present, Absent |
| Name | Key | String | Login name | None | Any valid login name |
| LoginType | Write | String | Type of login (SQL, Windows, etc.) | None | SQLLogin, WindowsUser, etc. |
| DefaultDatabase | Write | String | Default database for login | None | Any valid database name |
| Enabled | Write | Boolean | Whether the login is enabled | True | True, False |
| Password | Write | SecureString | Password for SQL logins | None | Valid password |
Special considerations or limitations
Must support both SQL and Windows logins, handle enable/disable scenarios, and ensure idempotency. Contributors should ensure sensitive data is handled securely and account for permissions required to manage logins.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating existing class-based resources and their tests, then compare their patterns with the proposed SqlLogin commands and properties; done means SQL and Windows logins are managed idempotently, including presence, removal, enablement, passwords, and secure handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, sql
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100