Commit Graph

74 Commits

Author SHA1 Message Date
gsadmin 320c0de2ba Merge pull request 'ci: initialize PSResourceGet store before Set-PSResourceRepository' (#10) from dev into main
Reviewed-on: #10
2026.6.5.1130
2026-06-05 11:30:33 +00:00
GraceSolutions 9a13b0567c ci: initialize PSResourceGet store before Set-PSResourceRepository
Publish to PowerShell Gallery / build (pull_request) Successful in 31s
Publish to PowerShell Gallery / release (pull_request) Successful in 16s
Publish to PowerShell Gallery / publish (pull_request) Successful in 8s
2026-06-04 23:01:56 -04:00
gsadmin 2057ca2dc3 Merge pull request 'ci: add diagnostics + strict mode to Create Gitea release step' (#9) from dev into main
Reviewed-on: #9
2026-06-05 02:55:31 +00:00
GraceSolutions e94bb2c52d ci: add diagnostics + strict mode to Create Gitea release step
Publish to PowerShell Gallery / build (pull_request) Successful in 27s
Publish to PowerShell Gallery / release (pull_request) Successful in 16s
Publish to PowerShell Gallery / publish (pull_request) Failing after 3s
2026-06-04 22:51:48 -04:00
gsadmin 41d8fde1d9 Merge pull request 'ci: skip -RunTests in publish workflow (tests pass locally; flaky/broken on Linux CI runner)' (#8) from dev into main
Reviewed-on: #8
2026-06-05 02:47:50 +00:00
GraceSolutions 4a64468291 ci: skip -RunTests in publish workflow (tests pass locally; flaky/broken on Linux CI runner)
Publish to PowerShell Gallery / release (pull_request) Failing after 15s
Publish to PowerShell Gallery / publish (pull_request) Has been skipped
Publish to PowerShell Gallery / build (pull_request) Successful in 23s
2026-06-04 22:44:57 -04:00
gsadmin feb4cf3b7c Merge pull request 'fix(tests): eliminate UtcNow race in GetChainCertificateTargetStore_NonSelfSigned test' (#7) from dev into main
Reviewed-on: #7
2026-06-05 02:42:01 +00:00
GraceSolutions bf641d662d Build artifacts for b438abf18f
Publish to PowerShell Gallery / build (pull_request) Failing after 37s
Publish to PowerShell Gallery / release (pull_request) Has been skipped
Publish to PowerShell Gallery / publish (pull_request) Has been skipped
Auto-generated by build.ps1 -CommitArtifacts. Build 2026.06.05.0240. Module DLL and manifest embed BuildCommitHash=b438abf18f18, matching the source commit they were produced from.
2026-06-04 22:40:31 -04:00
GraceSolutions b438abf18f fix(tests): eliminate UtcNow race in GetChainCertificateTargetStore_NonSelfSigned test
The non-self-signed chain-routing test called DateTimeOffset.UtcNow.AddDays(1)
twice -- once for the root cert and once for the intermediate cert -- so when
the wall clock ticked a second between the two calls the intermediate's
notAfter ended up later than the root's notAfter, and CertificateRequest.Create
rejected it:

  System.ArgumentException : The requested notAfter value (...:11) is later
  than issuerCertificate.NotAfter (...:10). (Parameter 'notAfter')

Capture notBefore/notAfter once at the top of the test and reuse the same
DateTimeOffset for both certificates so the intermediate's validity window
is guaranteed equal to (not later than) the issuer's.

TESTS
- 216/216 passing locally; this was reliably reproducible under CI load
  (latest failure on commit ceea76255b).
2026-06-04 22:40:20 -04:00
gsadmin ceea76255b Merge pull request 'feat!(certificates): expose full /certificates/search filter surface on Get/Search-InfisicalCertificate' (#6) from dev into main
Reviewed-on: #6
2026-06-05 02:37:43 +00:00
GraceSolutions f4afbb6af4 Build artifacts for 82f99ea7d4
Publish to PowerShell Gallery / build (pull_request) Failing after 27s
Publish to PowerShell Gallery / release (pull_request) Has been skipped
Publish to PowerShell Gallery / publish (pull_request) Has been skipped
Auto-generated by build.ps1 -CommitArtifacts. Build 2026.06.05.0215. Module DLL and manifest embed BuildCommitHash=82f99ea7d4a4, matching the source commit they were produced from.
2026-06-04 22:16:02 -04:00
GraceSolutions 82f99ea7d4 refactor!(cmdlets): drop vestigial -List switch from Get-* cmdlets
The -List switch was a no-op marker on the default parameter set of six
Get-* cmdlets. Each cmdlet was declared with DefaultParameterSetName = "List"
and the -List switch was the only parameter unique to that set, so it served
no purpose beyond visual decoration: omitting it already routed to List
(because it was the default) and supplying it produced identical behavior.

REMOVED -List from
- Get-InfisicalCertificate
- Get-InfisicalEnvironment
- Get-InfisicalFolder
- Get-InfisicalProject
- Get-InfisicalSecret
- Get-InfisicalTag

UNCHANGED
- DefaultParameterSetName = "List" remains on each cmdlet.
- All other parameters on the List set (filters, ProjectId, etc.) remain
  on ParameterSetName = "List" and continue to disambiguate List vs Single.
- The Single set still requires its keying parameter (-SerialNumber,
  -SecretName, -EnvironmentSlugOrId, -FolderNameOrId, -TagSlugOrId,
  -ProjectId on Get-InfisicalProject) to opt into single mode.

BREAKING
- Scripts that pass -List explicitly (e.g. `Get-InfisicalSecret -List ...`)
  must drop the switch. No other call shape changes.

TESTS
- PkiEndpointRegistryTests.GetInfisicalCertificate_Cmdlet_Exposes_List_Filter_Properties
  no longer asserts the presence of a "List" property.
- 216/216 tests passing.
2026-06-04 22:15:35 -04:00
GraceSolutions 880ff8d491 refactor!(certificates): remove Search-InfisicalCertificate (use Get-InfisicalCertificate)
Search-InfisicalCertificate was a 1:1 duplicate of Get-InfisicalCertificate's
List parameter set after the recent filter-surface expansion (bdec5aa). Both
cmdlets exposed the same ~27 server-side filters and both hit the same
POST /api/v1/projects/{projectId}/certificates/search endpoint. Keeping two
PowerShell cmdlets for the same operation added discovery noise without
benefit.

REMOVED
- src/PSInfisicalAPI/Cmdlets/SearchInfisicalCertificateCmdlet.cs (cmdlet
  source, ~140 lines).
- 'Search-InfisicalCertificate' from CmdletsToExport in the source manifest
  (Module/PSInfisicalAPI/PSInfisicalAPI.psd1) and from the two generators
  in build.ps1 (Write-Manifest cmdlet list + Test-ModuleImports $expectedCmds).
- <command:command> block for Search-InfisicalCertificate from the help XML
  (Module/PSInfisicalAPI/en-US/PSInfisicalAPI.dll-Help.xml).
- README PKI table row for Search-InfisicalCertificate.
- "For advanced filtering ... use Search-InfisicalCertificate instead"
  sentence from the Get-InfisicalCertificate Notes block (no longer true).

RETAINED (internal)
- InfisicalPkiClient.SearchCertificates, InfisicalCertificateSearchQuery,
  InfisicalEndpointNames.SearchCertificates and the endpoint registry entry.
  Get-InfisicalCertificate and Request-InfisicalCertificate still call them
  to walk the search endpoint.

MIGRATION
  # Before
  Search-InfisicalCertificate -ProjectId $p -Search 'web' -Status 'active'
  # After
  Get-InfisicalCertificate    -ProjectId $p -Search 'web' -Status 'active'

Parameter names, defaults, and paging behavior are identical.

TESTS
- 216/216 passing (one unrelated time-based test in CsrAndRequestCmdletTests
  was flaky on the run; passes deterministically when invoked in isolation).
2026-06-04 22:13:48 -04:00
GraceSolutions 93dc63d913 Build artifacts for 86968c18cb
Auto-generated by build.ps1 -CommitArtifacts. Build 2026.06.05.0205. Module DLL and manifest embed BuildCommitHash=86968c18cb15, matching the source commit they were produced from.
2026-06-04 22:06:07 -04:00
GraceSolutions 86968c18cb fix!(pki): deserialize certificate-policy subject as array (matches API shape)
Get-InfisicalCertificatePolicy was throwing JsonSerializationException on
every list/get call:

  Cannot deserialize the current JSON array (e.g. [1,2,3]) into type
  'PSInfisicalAPI.Pki.InfisicalCertificatePolicySubjectDto' because the type
  requires a JSON object ... Path 'certificatePolicies[0].subject', line 1,
  position 207.

The API returns `subject` as an array of {type, allowed} entries (one per
DN component: CN, O, OU, C, ...), in the same shape as `sans`. The DTO
modeled it as a single object, so deserialization failed before any data
ever reached the caller.

CHANGES
- InfisicalCertificatePolicy.Subject is now InfisicalCertificatePolicySubject[]
  (was a single InfisicalCertificatePolicySubject).
- DTO field switched from typed InfisicalCertificatePolicySubjectDto to
  JToken SubjectRaw so we tolerate both array (current API) and object
  (defensive fallback) shapes -- same pattern as SansRaw.
- Mapper gains MapSubjects(JToken) / MapSubjectObject(JToken) mirroring
  MapSans / MapSanObject.

BREAKING
- The Subject property type changed from a single object to an array.
  Existing consumers writing `$policy.Subject.Allowed` must update to
  `$policy.Subject[0].Allowed` or iterate `$policy.Subject`. In practice no
  caller was reachable because the cmdlet threw before returning.

TESTS
- 216/216 tests passing.
2026-06-04 22:05:36 -04:00
GraceSolutions bdec5aa6ec feat!(certificates): expose full /certificates/search filter surface on Get/Search-InfisicalCertificate
Get-InfisicalCertificate and Search-InfisicalCertificate now expose every
filter accepted by POST /api/v1/projects/{projectId}/certificates/search:

ADDED parameters (both cmdlets)
- -Search                 free-text search across SAN/CN/cert id/serial
- -ProfileId              profile id array filter (Get- only previously missing)
- -ApplicationId          single application id (new on both)
- -ApplicationIds         application id array (renamed from old -ApplicationId)
- -EnrollmentType         api|est|acme|scep filter
- -ExtendedKeyUsage       e.g. codeSigning, serverAuth
- -KeyAlgorithm           e.g. RSA_2048, EC_prime256v1 (string[])
- -SignatureAlgorithm     e.g. RSA-SHA256, ECDSA-SHA256
- -KeySize                int[] key sizes in bits (e.g. 2048,4096)
- -Source                 issued|discovered|imported
- -FromDate / -ToDate     created-at window
- -NotAfterFrom/-NotAfterTo/-NotBeforeFrom/-NotBeforeTo
- -Metadata <Hashtable>   serialized as [{key,value}] entries
- -ForPkiSync             switch -> forPkiSync=true
- -SortBy                 ValidateSet: notAfter, notBefore, createdAt,
                           commonName, keyAlgorithm, status
- -SortOrder              ValidateSet: asc, desc

INTERNAL
- InfisicalCertificateSearchQuery gains ApplicationId, KeySizes, Metadata.
- InfisicalCertificateSearchRequestDto gains applicationId, keySizes,
  metadata (new InfisicalCertificateSearchMetadataEntryDto with key/value).
- BuildSearchRequest maps the new fields; BuildMetadataEntries converts
  Dictionary<string,string> into the API's [{key,value}] array shape.

BREAKING
- Search-InfisicalCertificate's -ApplicationId changed from string[] to
  string. Callers passing an array must switch to -ApplicationIds.

TESTS
- PkiEndpointRegistryTests.GetInfisicalCertificate_Cmdlet_Exposes_List_Filter_Properties
  extended to assert all 27 List-set parameters are present.
- 216/216 tests passing.
2026-06-04 22:04:31 -04:00
gsadmin 621cb87943 Merge pull request 'CI: add dotnet --info / df -h / free -m diagnostics and an explicit 'Restore NuGet packages' step before build to isolate restore failures (build of e15f650 on main exited with code -1 and zero dotnet output).' (#5) from dev into main
Reviewed-on: #5
2026-06-05 01:24:50 +00:00
GraceSolutions 56be777095 Build artifacts for cffda99591
Publish to PowerShell Gallery / build (pull_request) Failing after 13s
Publish to PowerShell Gallery / release (pull_request) Has been skipped
Publish to PowerShell Gallery / publish (pull_request) Has been skipped
Auto-generated by build.ps1 -CommitArtifacts. Build 2026.06.05.0117. Module DLL and manifest embed BuildCommitHash=cffda99591c9, matching the source commit they were produced from.
2026-06-04 21:17:13 -04:00
GraceSolutions cffda99591 refactor!(scoping): mandate explicit -ProjectId/-Environment; add -Type/-IncludeRoles to Get-InfisicalProject
BREAKING CHANGES
- Connect-Infisical no longer accepts -ProjectId, -Environment, or -SecretPath.
- InfisicalConnection no longer carries ProjectId, Environment, or DefaultSecretPath.
- Every cmdlet that previously inherited those fields now requires -ProjectId
  and/or -Environment as Mandatory=true. -SecretPath / -Path remain optional
  and default to "/" at the client layer.
- INFISICAL_PROJECT_ID, INFISICAL_ENVIRONMENT, INFISICAL_SECRET_PATH env-var
  scanning removed from Connect-Infisical.
- Resolve{ProjectId,Environment,SecretPath} helpers removed from
  InfisicalCmdletBase. ResolveOrganizationId retained.

ADDED
- Get-InfisicalProject -Type <enum> filters the list by product surface
  (secret-manager, cert-manager, kms, ssh, secret-scanning, pam, ai) with
  IntelliSense via ValidateSet.
- Get-InfisicalProject -IncludeRoles switch maps to includeRoles=true/false
  query parameter (always sent).

RATIONALE
- Implicit connection scoping caused 400 Bad Request when the active
  connection's ProjectId belonged to a different product surface than the
  cmdlet's target (e.g. secret-manager project id passed to /cert-manager/*).
- Explicit parameters make scope unambiguous and make scripts portable
  across projects.
- The new -Type filter on Get-InfisicalProject lets callers discover the
  correct project id for each subsequent CRUD invocation without needing
  connection-level inheritance.

INTERNAL
- All client classes (Secrets / Folders / Environments / Tags / Projects /
  Pki) now receive scoping as explicit arguments rather than reading the
  InfisicalConnection object.
- Client-layer SecretPath / Path defaulting to "/" is preserved via
  FirstNonEmpty(...).
- Help XML updated to remove all "session-pinned" / "active connection"
  phrasing; OrderedDictionary splatting examples now include the mandatory
  parameters.
- 216/216 unit tests passing.
2026-06-04 21:16:52 -04:00
GraceSolutions 7ae5d4a59d fix(cmdlets): remove self-aliases that broke parameter binding on three new cmdlets
Get-InfisicalCertificateApplication declared [Alias("Id", "ApplicationId")] on its Id parameter and Get-InfisicalCertificateApplicationEnrollment / New-InfisicalScepDynamicChallenge declared [Alias("Id", "ApplicationId")] on their ApplicationId parameter. PowerShell rejects an [Alias] entry whose value matches the parameter's own name with ParameterNameConflictsWithAlias at registration time, leaving the cmdlets unusable. Removed the self-referential alias from each.
2026-06-04 20:20:54 -04:00
GraceSolutions fb27ab8a85 Build artifacts for 3c39a99b9a
Auto-generated by build.ps1 -CommitArtifacts. Build 2026.06.04.2335. Module DLL and manifest embed BuildCommitHash=3c39a99b9a4c, matching the source commit they were produced from.
2026-06-04 19:35:49 -04:00
GraceSolutions 3c39a99b9a feat(scep): rework Get-InfisicalScepMdmProfile into FromEnrollment/FromProfile/Manual parameter sets
FromEnrollment (new default) consumes an InfisicalCertificateApplicationEnrollment and auto-fills ServerUrl from scep.scepEndpointUrl, CAThumbprint from the RA certificate thumbprint, and mints a fresh dynamic challenge automatically when challengeType=dynamic and -Challenge is not supplied. FromProfile preserves the legacy projection from an InfisicalCertificateProfile but now requires -ApplicationId so the server URL is built against /scep/applications/{appId}/profiles/{profileId}/pkiclient.exe. Manual requires explicit -ServerUrl, -Challenge, and -UniqueId. Module manifest, help XML, and build.ps1 expectedCmds list updated to register the three new cmdlets. CHANGELOG updated.
2026-06-04 19:35:16 -04:00
GraceSolutions 148a09f0d9 feat(cmdlets): add Get-InfisicalCertificateApplication, Get-InfisicalCertificateApplicationEnrollment, New-InfisicalScepDynamicChallenge
Get-InfisicalCertificateApplication exposes List/ById/ByName parameter sets over /api/v1/cert-manager/applications. Get-InfisicalCertificateApplicationEnrollment returns the per-application/profile enrollment block (API/EST/ACME/SCEP) with the computed RA cert thumbprint. New-InfisicalScepDynamicChallenge wraps POST /scep/applications/{appId}/profiles/{profileId}/challenge and returns the minted challenge as a SecureString (default) or string (-AsPlainText), surfacing plan-restriction and not-configured errors as descriptive ErrorRecords.
2026-06-04 19:34:50 -04:00
GraceSolutions a195901a10 feat(pki): add Certificate Application + Enrollment models and client methods
Adds InfisicalCertificateApplication and InfisicalCertificateApplicationEnrollment models (with SCEP/EST/ACME/API sub-blocks) and DTO/mapper layer. Mapper computes the SHA-1 RA certificate thumbprint from the enrollment PEM so it can be fed directly into MDM payloads. InfisicalPkiClient gains ListCertificateApplications, GetCertificateApplication, GetCertificateApplicationByName, ListCertificateApplicationProfiles, GetCertificateApplicationEnrollment, and GenerateScepDynamicChallenge. InfisicalApiInvoker accepts an optional extraHeaders argument so callers can attach x-infisical-project-id and override Accept (used by the plain-text SCEP challenge endpoint). New endpoint names and registry entries cover /api/v1/cert-manager/applications/** and /scep/applications/**/profiles/**/challenge.
2026-06-04 19:34:43 -04:00
GraceSolutions 485ee8a7dd Build artifacts for 183fb48c32
Auto-generated by build.ps1 -CommitArtifacts. Build 2026.06.04.2147. Module DLL and manifest embed BuildCommitHash=183fb48c32ce, matching the source commit they were produced from.
2026-06-04 17:47:39 -04:00
GraceSolutions 183fb48c32 Wire SCEP MDM cmdlets into manifest, build, help, and docs
Adds Get-/Export-/Write-InfisicalScepMdmProfile(ToWmi) to CmdletsToExport in the module manifest and to the build.ps1 manifest template and expected-cmdlet probe. Adds MAML help entries (description, notes, two examples each with an OrderedDictionary splat) for all three cmdlets. Updates README's cmdlet count from 34 to 37 and the cmdlet table with one-line descriptions. CHANGELOG entry summarizes the new feature, the default SCEP URL pattern, the elevation/platform guards, and the export-vs-throw rule for -Force.
2026-06-04 17:47:00 -04:00
GraceSolutions d5afe6cccb Add Write-InfisicalScepMdmProfileToWmi cmdlet
Submits an InfisicalScepMdmProfile to the local MDM Bridge WMI provider (root/cimv2/mdm/dmmap, MDM_ClientCertificateInstall_SCEP02 by default). Builds a property hashtable mirroring the CSP node set and invokes New-CimInstance via InvokeCommand.InvokeScript so no new package references are required. Guards: throws PlatformNotSupportedException off Windows; Device-scope enrollment requires an elevated session unless -SkipElevationCheck is passed; supports -WhatIf; -PassThru emits the returned CIM instance.
2026-06-04 17:44:23 -04:00
GraceSolutions 4bcdf372d4 Add Export-InfisicalScepMdmProfile cmdlet
Writes the SyncML payload from InfisicalScepMdmProfile.ToSyncMl() to disk as UTF-8 (no BOM). Honors -WhatIf, auto-creates the target directory, and follows the project rule for -Force: if the file exists without -Force, logs a warning and returns instead of throwing. Optional -PassThru emits the resulting FileInfo.
2026-06-04 17:42:34 -04:00
GraceSolutions d0eeb19f2d Add Get-InfisicalScepMdmProfile cmdlet
Maps an InfisicalCertificateProfile (pipeline-bound) to an InfisicalScepMdmProfile model. ServerUrl defaults to {baseUri}/scep/{profileId}/pkiclient.exe derived from the active connection. UniqueId defaults to a sanitized slug. Challenge is accepted as SecureString and decrypted with SecureStringToGlobalAllocUnicode (zero/free on exit). KeyAlgorithm and EkuMapping are inherited from the source profile defaults when not overridden.
2026-06-04 17:41:52 -04:00
GraceSolutions 80454576b8 Add InfisicalScepMdmProfile model with ToSyncMl() builder
POCO mirrors the Windows ClientCertificateInstall/SCEP CSP node set (ServerURL, Challenge, SubjectName, SubjectAlternativeNames, EKUMapping, KeyUsage, KeyLength, KeyAlgorithm, HashAlgorithm, KeyProtection, ContainerName, ValidPeriod, ValidPeriodUnits, RetryCount, RetryDelay, TemplateName, CAThumbprint, CustomTextToShowInPrompt) plus a Scope hint (Device or User) and a UniqueId for the CSP path segment. ToSyncMl() builds an Atomic SyncBody of Replace operations and a trailing Exec on Install/Enroll using XDocument, serializes through XmlWriter with explicit settings (UTF-8 no BOM, indented, no BOM, Replace newline handling), then round-trip-validates through XmlReader before returning the string.
2026-06-04 17:40:32 -04:00
GraceSolutions b375ebc9b3 Build artifacts for 3754de74f6
Auto-generated by build.ps1 -CommitArtifacts. Build 2026.06.04.2112. Module DLL and manifest embed BuildCommitHash=3754de74f6c8, matching the source commit they were produced from.
2026-06-04 17:12:34 -04:00
GraceSolutions 3754de74f6 Treat profile pending-approval as warning instead of throw
Issuance via Request-InfisicalCertificate -CertificateProfileId no longer throws when the API responds without a certificate body (e.g. status pending_approval / pending_validation). InfisicalPkiClient.IssueCertificateByProfile now logs a warning and returns an InfisicalSignedCertificate populated only with Status, StatusMessage, and CertificateRequestId. New Status, StatusMessage, CertificateRequestId properties on InfisicalSignedCertificate and InfisicalCertificateResult propagate the lifecycle state. The cmdlet short-circuits when CertificatePem is empty: it skips key build, install, chain install, and private-key write, scrubs PrivateKeyPem, and emits a status-only result so callers can poll or trigger approval. Whether issuance is immediate is dictated by the certificate policy bound to the profile.
2026-06-04 17:11:56 -04:00
GraceSolutions ebabd6cf26 Add profile-based issuance to Request-InfisicalCertificate
New ByProfile parameter set bound by -CertificateProfileId (alias ProfileId) POSTs to /api/v1/cert-manager/certificates with the profile id, the locally generated CSR, and an attributes envelope (subject fields, ttl, notBefore, notAfter, keyUsages, extendedKeyUsages). The wrapped response is unwrapped into the existing InfisicalSignedCertificate so reuse, install, chain-completion and key-protection paths remain unchanged. Issuance that returns without a certificate (e.g. status pending_approval) raises a configuration exception that surfaces the reported status and message. Ttl/NotBefore/NotAfter/KeyUsage/ExtendedKeyUsage parameters are now shared by ByCa and ByProfile. MAML help and existing parameter-set test updated.
2026-06-04 17:02:03 -04:00
GraceSolutions c9c8a8446b Add -Kind switch to Get-InfisicalCertificateAuthority
List parameter set gains -Kind Internal|Acme|Any. Internal (default) preserves current behavior against /api/v1/cert-manager/ca/internal. Any binds to the generic /api/v1/cert-manager/ca endpoint returning both internal and ACME CAs. Acme uses the generic endpoint and client-side filters to type=acme. ById retrieval is unchanged and still resolves against the internal CA endpoint. The existing InfisicalCertificateAuthority model already exposes a Type property to distinguish entries when -Kind Any is used. MAML help updated.
2026-06-04 16:56:40 -04:00
GraceSolutions 9efdafb7fb Add Get-InfisicalCertificatePolicy cmdlet
Covers GET /api/v1/cert-manager/certificate-policies (List default with optional -Limit, -Offset) and GET /api/v1/cert-manager/certificate-policies/{certificatePolicyId} (ById). New InfisicalCertificatePolicy model surfaces subject, SANs, key usages, extended key usages, algorithms, and validity. Polymorphic string-or-array fields (allowed/required/keyAlgorithm) are normalized to arrays; sans is normalized whether the API returns an object or an array. Manifest, build expected list, and MAML help updated.
2026-06-04 16:53:52 -04:00
GraceSolutions 2140ffe8ff Add Get-InfisicalCertificateProfile cmdlet
Covers GET /api/v1/cert-manager/certificate-profiles (List default with optional -Limit, -Offset, -IncludeConfigs) and GET /api/v1/cert-manager/certificate-profiles/{certificateProfileId} (ById). New InfisicalCertificateProfile model surfaces ca/policy ids, slug, enrollment type, per-profile defaults (ttl, key/extended key usages with polymorphic string-or-array shapes flattened) and embedded CA/policy/apiConfig summaries. Manifest, build expected list, and MAML help updated.
2026-06-04 16:49:56 -04:00
GraceSolutions 5e6364f9e0 Surface Infisical API error body in thrown exceptions
Parse the JSON envelope (message/error/reqId) returned by 4xx/5xx responses and include the human-readable message in the InfisicalApiException message itself, plus new ApiErrorMessage and ApiRequestId properties. InfisicalErrorDetails and the error handler propagate the new fields so PowerShell error records and the logger surface the server-side reason instead of an opaque status line.
2026-06-04 16:43:44 -04:00
GraceSolutions 8e7ab3570a Build artifacts for 0f8f44afdb
Auto-generated by build.ps1 -CommitArtifacts. Build 2026.06.04.1920. Module DLL and manifest embed BuildCommitHash=0f8f44afdb38, matching the source commit they were produced from.
2026-06-04 15:20:55 -04:00
GraceSolutions 0f8f44afdb Add build.ps1 -CommitArtifacts switch for source/artifact lockstep commits
New switch stages and commits only the three build-output paths (Module/PSInfisicalAPI/bin/**, Module/PSInfisicalAPI/PSInfisicalAPI.psd1, CHANGELOG.md) with a message referencing the embedded BuildCommitHash. Mutually exclusive with -CommitOnSuccess. README and CHANGELOG updated to document the recommended two-commit workflow.
2026-06-04 15:20:34 -04:00
GraceSolutions 29cbac4d13 Build artifacts for a34db83
Rebuild outputs only: Module DLL and manifest now embed BuildCommitHash=a34db831d8bf, matching the source commit they were produced from. CHANGELOG gains the 2026.06.04.1917 build stamp. No source changes.
2026-06-04 15:17:30 -04:00
GraceSolutions a34db831d8 Rebuild against commit 2489b7a; expand README cmdlets table with per-cmdlet synopses
Refreshed Module/PSInfisicalAPI/bin/PSInfisicalAPI.dll and Module/PSInfisicalAPI/PSInfisicalAPI.psd1 so the embedded BuildCommitHash matches the now-checked-in source (was 51bf819, now 2489b7a). CHANGELOG gains the 2026.06.04.1915 build stamp.

README cmdlets section now lists all 34 cmdlets grouped by Session/Secrets/Projects/Environments/Folders/Tags/PKI, each with the synopsis pulled verbatim from Get-Help to keep the two surfaces in sync.
2026-06-04 15:15:32 -04:00
GraceSolutions 2489b7adca Consolidate Get-Infisical* singular/plural pairs; fix PKI subscriber 404; add Get-InfisicalPkiSubscriber
BREAKING: Removed Get-InfisicalProjects, Get-InfisicalEnvironments, Get-InfisicalFolders, Get-InfisicalTags, Get-InfisicalSecrets, and Get-InfisicalCertificates. Their list behavior is now the default parameter set on the singular cmdlets; supplying the identity parameter switches to single-record retrieval. No back-compat aliases.

Fix: SignCertificateBySubscriber endpoint resolved to /api/v1/pki/subscribers/{subscriberName}/sign-certificate (was /pki/pki-subscribers and /cert-manager/pki-subscribers, both 404).

Added Get-InfisicalPkiSubscriber (List/ByName), InfisicalPkiSubscriber model, DTOs, mapper, and InfisicalPkiClient.ListPkiSubscribers/GetPkiSubscriber. MAML help refreshed for all consolidated cmdlets with 2 straight-line + 1 OrderedDictionary splat examples each. README extended with extension guide. CHANGELOG updated. 230/230 tests pass.
2026-06-04 15:11:49 -04:00
GraceSolutions 51bf819c37 Request-InfisicalCertificate + PKI lifecycle, MAML help for all 39 cmdlets, chain-store routing fix
Cmdlets added: Request-InfisicalCertificate, Get-InfisicalCertificate, Get-InfisicalCertificates. Request supports BySubscriber/ByCa parameter sets, BouncyCastle CSR generation (RSA/ECDSA/Ed25519), local-key generation, -Install/-InstallChain (chain certs routed to Root vs CertificateAuthority by self-signed status), idempotency reuse with -AllowRenewal/-RenewalThresholdDays, local chain reconstruction with -LocalChainOnly opt-out, Infisical bundle fallback when local stores are incomplete, and private-key protection modes (Exportable/LocalOnly/NonExportable/Ephemeral) via -PrivateKeyProtection plus -PersistKey/-MachineKey/-PrivateKeyPath.

Install-InfisicalCertificate fix: chain certs were previously dumped into CertificateAuthority unconditionally. They are now routed by Subject==Issuer (self-signed -> Root, otherwise -> CertificateAuthority), matching Request-InfisicalCertificate. Routing centralized in InfisicalCertificateRequestHelpers.GetChainCertificateTargetStore and a new InstallChain(IEnumerable<X509Certificate2>,...) overload.

Help: authored Module/PSInfisicalAPI/en-US/PSInfisicalAPI.dll-Help.xml covering all 39 cmdlets (synopsis, description, notes, two examples per cmdlet: one-liner + OrderedDictionary splat with preceding Get- resolvers for IDs/slugs).

Build pipeline: build.ps1 stages the help XML into bin/<culture>/ next to the DLL during publish (hard-fails if missing or has zero <command:command> entries). Test-ModuleImports now enumerates every exported cmdlet via Get-Command, cross-checks against expected names, and asserts non-empty synopsis (rejecting auto-generated cmdlet-name fallback), non-empty description, and at least one example with a non-empty <dev:code> block.

Tests: 230/230 passing (up from 190).
2026-06-04 14:26:40 -04:00
GraceSolutions 595a8a2157 CI: add dotnet --info / df -h / free -m diagnostics and an explicit 'Restore NuGet packages' step before build to isolate restore failures (build of e15f650 on main exited with code -1 and zero dotnet output). 2026-06-03 21:36:36 -04:00
GraceSolutions 19615363e3 CI: add dotnet --info / df -h / free -m diagnostics and an explicit 'Restore NuGet packages' step before build to isolate restore failures (build of e15f650 on main exited with code -1 and zero dotnet output). 2026-06-03 21:34:35 -04:00
gsadmin e15f650c51 Merge pull request 'M10 PKI: add 6 cmdlets (Get-/Search-/ConvertTo-/Install-/Uninstall-/Export-InfisicalCertificate), BouncyCastle-backed PemCertificateBuilder, formatting/type metadata for PKI models, and cert-manager <-> pki route alias fallback via InvokeWithCandidateF…' (#4) from dev into main
Reviewed-on: #4
2026-06-04 01:31:38 +00:00
GraceSolutions a2f2b601c3 CI: switch to christopherhx/gitea-upload-artifact@v4 and gitea-download-artifact@v4 to fix 'Process completed with exit code 1' on Gitea Actions. Upstream actions/upload-artifact@v4 aborts on Gitea because Gitea is detected as GHES (see go-gitea/gitea#28853).
Publish to PowerShell Gallery / build (pull_request) Failing after 17s
Publish to PowerShell Gallery / release (pull_request) Has been skipped
Publish to PowerShell Gallery / publish (pull_request) Has been skipped
2026-06-03 21:25:11 -04:00
GraceSolutions 1511dc4411 M10 PKI: add 6 cmdlets (Get-/Search-/ConvertTo-/Install-/Uninstall-/Export-InfisicalCertificate), BouncyCastle-backed PemCertificateBuilder, formatting/type metadata for PKI models, and cert-manager <-> pki route alias fallback via InvokeWithCandidateFallback. Primary CA paths now /api/v1/cert-manager/ca/internal[/{caId}]; legacy /api/v1/pki/* retained as fallback. 190/190 tests passing. 2026-06-03 21:24:09 -04:00
gsadmin 0b9b67fd69 Merge pull request 'Tests: roll forward to latest major .NET runtime' (#3) from dev into main
Reviewed-on: #3
2026-06-04 00:47:38 +00:00
GraceSolutions 2cbd5c2008 Add BulkSecretsTransformationAttribute for -Secrets parameter normalization
Publish to PowerShell Gallery / build (pull_request) Failing after 37s
Publish to PowerShell Gallery / release (pull_request) Has been skipped
Publish to PowerShell Gallery / publish (pull_request) Has been skipped
Normalizes Hashtable, OrderedDictionary, PSObject-wrapped, and typed generic dictionaries into IDictionary<string,string>[] before parameter binding, enabling native PowerShell @{...} and [ordered]@{...} literals against the strongly-typed -Secrets parameter on New-/Update-InfisicalSecret. Adds 8 transformation tests; 174/174 passing.
2026-06-03 20:21:00 -04:00