Commit bf30562
* feat(logging): Log obfuscated token request body and raw error response
Logs the token endpoint request body (with password/client_secret redacted)
and the raw response body on non-2xx status codes to aid troubleshooting
of authentication failures without exposing credentials.
* chore(security): Exclude sensitive local files from version control
Adds .env, scripts/, and client_pam.json to .gitignore to prevent
accidental commit of credentials, bearer tokens, and local test output.
* chore(deps): Bump TestConsole target framework and global SDK to .NET 10
* refactor(config): Remove dead IValidatableObject implementation
Validate() was never invoked — validation is enforced imperatively in
ValidateServerConfigurationParams() and ValidateInstanceParams(). Calling
Validator.TryValidateObject() would also incorrectly fail for the
client_credentials flow (which stores GrantType="password" internally to
satisfy the Delinea API). Data annotation attributes are retained for
documentation value.
* feat(logging): Add structured audit logging for SOX/SOC2 compliance
- Log caller identity (Environment.UserName, MachineName), SecretId,
field name, target URL, and grant type on every GetPassword invocation
- Record API call duration (Stopwatch) for both token and secret endpoints
- Include SecretId, field, grant type, and URL in success and failure log events
- Improve auth failure log with URL, grant type, and caller identity context
- Truncate Secret Server error response bodies to 500 chars before logging
- Remove raw token response body from deserialization failure log path
- Switch .Result to .GetAwaiter().GetResult() to avoid exception masking
* fix(test-console): Mask password value in test output
* docs(changelog): Update v1.3.0 changelog with compliance logging improvements
* fix(logging): Throw on missing secret field instead of returning empty string
* fix(logging): Truncate token endpoint error body before logging
* fix(logging): Add authentication attempt log event for Windows auth path
* feat(logging): Add authentication success log event with caller identity
* feat(logging): Thread correlation ID through all PAM operation log events
* fix(logging): Capture HTTP call duration in exception paths
* refactor: Remove duplicate SecretResponse class
* fix(manifest): Set Username and ClientId to non-secret DataType
* fix(test-console): Require environment variables, remove hardcoded credential defaults
* docs(logging): Document Environment.UserName OS identity limitation
* docs(changelog): Add compliance remediation items to v1.3.0 changelog
* docs(changelog): Remove audit severity labels from compliance remediation entries
* docs: Clean up changelog and document SkipTlsValidation in DelineaConfiguration
* docs(readme): Set Username and ClientId to DataType 1 in manifest example
* chore(docs): Update CHANGELOG.md
* refactor(pam): extract SecretServerPamBase and add grant-type-specific PAM types
Extract all shared HTTP, validation, and secret-retrieval logic into an
abstract base class SecretServerPamBase. Add three concrete subclasses —
SecretServerPamPassword, SecretServerPamClientCredentials, and
SecretServerPamWindows — each implementing IPAMProvider with a hardcoded
grant type. The existing SecretServerPam class is unchanged (backwards
compatible).
Also fixes a pre-existing bug where BuildDelineaConfiguration set
GrantType = "password" on the DelineaConfiguration returned for the
client_credentials case; it now correctly sets "client_credentials".
SecretFieldName validation is tightened to reject whitespace-only values
(previously only empty string was rejected).
InternalsVisibleTo("delinea-secretserver-pam.Tests") added via AssemblyInfo.cs
to allow the xUnit test project to reach the internal test constructors.
* test: add xUnit test project covering all four PAM types and auth flows
Adds delinea-secretserver-pam.Tests (net8.0) with 38 tests covering:
- Happy path for password, client_credentials, and windows grant types
- Missing required server and instance parameters
- Non-success HTTP responses from token and secret endpoints
- Empty/null token responses
- Field-not-found in secret response
- Token request body field name verification (Delinea API constraint:
client_credentials still uses username/password key names)
- Windows auth correctly targets winauthwebservices endpoint and never
calls the token endpoint
- All four PAM type Names are distinct
TestHttpMessageHandler fake allows request interception without network access.
* feat(manifest): register three new grant-type-specific PAM types
integration-manifest.json: add Delinea-SecretServer-Password,
Delinea-SecretServer-ClientCredentials, and Delinea-SecretServer-Windows
PAM type blocks. Each exposes only the fields relevant to its auth flow,
removing the Command UI requirement to fill in irrelevant credentials.
manifest.json: add InitializationInfo example blocks for the three new
types alongside the existing Delinea-SecretServer block.
CHANGELOG.md and README.md updated to document all four types, including
recommended usage guidance and kfutil commands for the new variants.
* Update generated docs
* docs: add docsource files for new PAM types and regenerate docs via doctool
- Add docsource/overview.md documenting all four PAM types
- Add per-type docsource files for Password, ClientCredentials, Windows variants
- Update docsource/delinea-secretserver.md for backwards-compat type
- Remove deprecated readme-src/ directory
- Regenerate README.md and docs/ via doctool (adam_dotNetVpython_Fixes branch)
* Update generated docs
* feat: support KEYFACTOR_PAM_SKIP_TLS_VALIDATION environment variable
Allows TLS certificate validation to be disabled via environment variable
in addition to the existing SkipTlsValidation configuration parameter.
Either setting is sufficient to disable validation; the env var does not
need to be set if the config parameter is already true.
* test: add tests for SkipTlsValidation config param and KEYFACTOR_PAM_SKIP_TLS_VALIDATION env var
- SkipTlsValidation config param: verified succeeds when set to true
- KEYFACTOR_PAM_SKIP_TLS_VALIDATION env var: verified true and 1 both enable skip
- Env var set to false does not interfere when config param is also false
- client_credentials token body: asserts grant_type=password (Delinea API constraint)
- Integration-tested both TLS skip paths against live Secret Server instance
* Update generated docs
* test: add integration tests that skip gracefully when env vars are not set
Adds IntegrationFactAttribute which sets Skip at attribute construction time
if any of the required SECRET_SERVER_* env vars are absent, producing a clean
skip rather than a failure in CI environments without live server access.
* chore(changelog): merge v1.4.0 entries into v1.3.0
* feat: treat N/A as empty input for all config and instance parameters
Adds NormalizeConfig which maps 'N/A' (case-insensitive, whitespace-trimmed)
to empty string before validation runs, so users can enter N/A as a dummy
value in the Keyfactor Command UI for fields irrelevant to their auth flow.
* docs: document N/A dummy value support in overview and changelog
* Update generated docs
* test(integration): add live-server test for N/A dummy value passthrough
Verifies that N/A dummy values in connection config fields irrelevant to
the password auth flow are stripped by NormalizeConfig before validation
and do not prevent secret retrieval from a live Secret Server instance.
* ci: add dotnet-ci workflow and Terraform config for GitHub environment
- Add .github/workflows/dotnet-ci.yml: unit-test job runs on every PR/push
with no env vars (integration tests auto-skip); integration-test job is
gated by vars.INTEGRATION_TESTS_ENABLED and uses the integration-tests
GitHub environment provisioned by Terraform.
- Add terraform/ config backfilling the existing repo, team access, and
branch ruleset; creates the integration-tests environment with
SECRET_SERVER_* secrets and INTEGRATION_TESTS_ENABLED repo variable.
- State stored in Azure Blob (kfghtfstatesn84ro / tfstate container).
* chore: remove terraform/ from version control (gitignore)
* fix(ci): add Keyfactor GitHub Packages NuGet feed before build
* ci: trigger workflow run for TLS validation test
---------
Co-authored-by: spb <1661003+spbsoluble@users.noreply.github.com>
Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io>
1 parent ba3fb27 commit bf30562
29 files changed
Lines changed: 3018 additions & 836 deletions
File tree
- .github/workflows
- TestConsole
- delinea-secretserver-pam.Tests
- Fakes
- delinea-secretserver-pam
- Models
- docsource
- docs
- readme-src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
1 | 53 | | |
2 | 54 | | |
3 | 55 | | |
| |||
9 | 61 | | |
10 | 62 | | |
11 | 63 | | |
12 | | - | |
| 64 | + | |
0 commit comments