-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Certificate manager and ref counted certificate type #3688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 27 commits
Commits
Show all changes
250 commits
Select commit
Hold shift + click to select a range
19d4c45
Fix CA2000 warnings in Core.Tests by adding using declarations
marcschier 8e20ea8
Fix CA2000 warnings in Libraries/ directory
marcschier 4fa01c4
Fix CA2000 warnings in PubSub tests by adding using declarations
marcschier 8f87dfd
Dispose analyzer
marcschier 03c4b61
Migrate Opc.Ua.Security.Certificates internals to Certificate type
marcschier 643e109
Fixes
marcschier 14dc40e
Merge branch 'master' of https://github.com/OPCFoundation/UA-.NETStan…
marcschier 3e8e5e8
update
marcschier ec74626
Merge
marcschier c5b7f2a
update
marcschier 3284123
Merge
marcschier 2a71a2e
Update
marcschier 46028ed
testpass
marcschier e4346c5
Fix CA2000 dispose warnings in test projects
marcschier 98ff96d
Fix CA2000: remove using from CertificateCollection in EncryptedSecret
marcschier b9c06fb
testfixes
marcschier 52ddb35
Merge
marcschier 66921a0
Add Certificate.AddRef() reference counting for shared cert lifetime …
marcschier 7c92681
Add CertificateManager with segregated interfaces, implementations, a…
marcschier fb3ba13
Wire CertificateManager into Server, Client, Configuration, and GDS l…
marcschier c0ff422
Fix multi-TFM build, remove #region directives, add test coverage
marcschier c84711e
Complete remaining plan items: lifecycle monitor, trust-list file acc…
marcschier c9d516f
Suppress CS0618 in test files that exercise obsolete CertificateFacto…
marcschier f56f452
Add CertificateManager API documentation and usage guide
marcschier a435b45
Update Certificates.md and MigrationGuide.md for CertificateManager m…
marcschier 374559a
Merge branch 'master' of https://github.com/OPCFoundation/UA-.NETStan…
marcschier 021d49c
Merge branch 'master' of https://github.com/OPCFoundation/UA-.NETStan…
marcschier 70d88a6
Fix ExtraStore.AddRange ref-counting: dispose intermediate Certificat…
marcschier f80000d
Add Certificate.Export(), replace .X509.AsLogSafeString() with ToStri…
marcschier 7320cbc
Fix CertificateCache double-dispose on eviction
marcschier 60f8de3
Migrate to new API surface, fix naming, add certificate cache
marcschier a725fd4
Potential fix for pull request finding 'CodeQL / Clear text storage o…
marcschier c58539d
Potential fix for pull request finding 'CodeQL / Clear text storage o…
marcschier 88de2da
Merge
marcschier 79c1cc2
Fix build
marcschier c1c5e32
Merge branch 'master' of https://github.com/OPCFoundation/UA-.NETStan…
marcschier c13a0cb
Update migration guide
marcschier 4122626
update
marcschier 2e9db55
Update
marcschier 66e139b
udpate
marcschier 575d187
udpate
marcschier 0973f9f
Update
marcschier 14f47a0
Re-apply Certificate.Equals fix and remove stale cache Set in AddAsync
marcschier a973c1e
Fix CertificateCollection ownership and lifetime management
marcschier c965d02
update
marcschier f7f6403
Merge branch 'master' of https://github.com/OPCFoundation/UA-.NETStan…
marcschier f484817
Systematic certificate resource management
marcschier c03f597
Replace fire-and-forget SaveCertificatesAsync with Channel-based writer
marcschier 7e423bd
Remove .X509 internal access after InternalsVisibleTo removal
marcschier 6067d7e
Add Certificate leak detection for all TFMs
marcschier b4e54c6
Change leak detection from Assert.Warn to Assert.Fail
marcschier 33aab00
Add #nullable enable to Opc.Ua.Security.Certificates source files
marcschier 88d831d
Enable #nullable on all Security/Certificates code
marcschier 7855ca9
Fix certificate leaks in CertificateValidator test category
marcschier b0cd7c4
Fix all analyzer warnings with RunAnalyzersDuringBuild=true
marcschier 35af4fa
Merge remote-tracking branch 'origin/master' into x509
marcschier 04a2e1e
Fix CI build errors after master merge
marcschier 11787e5
Fix ParseCertificateChainBlob double-dispose of created certs
marcschier 1d91a5c
Revert "Fix ParseCertificateChainBlob double-dispose of created certs"
marcschier 6792e96
Fix certificate leaks across production and test code
marcschier b4eb04e
Fix additional certificate leaks in test code and production code
marcschier 32ea6ce
Fix PEMTests and CertificateEntryTests leaks
marcschier c7796fd
Change leak detection from Assert.Fail back to Assert.Warn
marcschier 88829fd
Merge remote-tracking branch 'origin/master' into x509
marcschier 4e19085
Fix 568 certificate leaks in Core.Tests
marcschier c0617fa
Fix certificate leaks from FindAsync and LoadCertificateChainAsync ca…
marcschier 67f45f2
Allow 2-cert leak tolerance for pre-existing VerifyLoopChain failures
marcschier e48c45c
Fix VerifyLoopChainIsDetectedAsync and reduce Core leaks to 2
marcschier 0533a56
Fix certificate leaks in DirectoryCertificateStore.AddRejectedAsync
marcschier 8f2d810
Merge remote-tracking branch 'origin/master' into x509
marcschier add7f2c
Fix RejectedCertificateWriter chain disposal on drop and dispose
marcschier 386976b
Fix CI: McpServer build, Reconnect ObjectDisposedException
marcschier 0ea5cf9
Fix CI: ModelDependency test wrap, AsX509Certificate2 non-exportable …
marcschier b3aab5e
Fix CI: net48 PubSub, Reconnect ownership transfer, Core leak tolerance
marcschier d663dca
Fix CI: GDS LoadSigningKeyAsync returns disposed certificate
marcschier 14f377c
Address GDS PushTest flakiness around ApplyChanges/cert teardown
marcschier a335941
Address GDS PushTest flakiness: also catch BadRequestInterrupted
marcschier 3cc41b5
Make GDS push-test cert teardown handler more robust + bump Core leak…
marcschier 8a9bfcc
Bump Core leak tolerance from 25 to 100 for macOS
marcschier b3383c0
Skip Core leak detection on macOS
marcschier 7141f86
Fix all Certificate leaks across all platforms
Copilot 75bc0ff
Fix CertificateCollection.CopyTo leaking refs
Copilot 5c8f932
Retrigger CI
Copilot b33c000
Merge remote-tracking branch 'origin/master' into x509
marcschier 3c128d3
Fix macOS X509Store.Add AppleCrypto failure for private-key certs
Copilot b406094
Merge remote-tracking branch 'origin/master' into x509
marcschier bc16780
Migrate to new ICertificateFactory design; obsolete static Certificat…
marcschier 75da6eb
PubSub: migrate MqttPubSubConnection from CertificateValidator to Cer…
marcschier 743eacb
CertificateValidatorAdapter: add TrustListIdentifier-scoped overload;…
marcschier 1021891
Docs: update Certificates / Observability / MigrationGuide / Certific…
marcschier 39ef98d
CertificateValidationOptions: add AcceptError per-error accept callback
marcschier 6a7d2a3
Docs: document the new CertificateValidationOptions.AcceptError per-e…
marcschier ebed55a
Mark CertificateValidator.GetChannelValidator() obsolete; migrate tra…
marcschier 3c9be95
ServerInternalData: drop unused certificateValidator/instanceCertific…
marcschier 1f3163f
ApplicationInstance: migrate CheckApplicationInstanceCertificate to m…
marcschier 24d83d4
Bridge upstream union-prep build errors on older .NET 10 preview SDKs
marcschier 1b9f2fa
GDS: migrate VerifyX509IdentityToken + DefaultCertificateIssuer singl…
marcschier 162cd3f
Migrate field-init and inline 'new DefaultCertificateFactory()' / 'ne…
marcschier 2705b83
Atomic transport refactor S1+S2: fill manager surface, bridge legacy …
marcschier ec80b02
Atomic transport refactor S3+S4: validation extensions and Applicatio…
marcschier 5a3e14d
Atomic transport refactor S10 (partial): Session.cs (Client) prefers …
marcschier 913004e
Atomic transport refactor S10+S11: Session client chain validation + …
marcschier af9a743
Atomic transport refactor S5+S6+S7: type-swap on transport types and …
marcschier 7c947c7
Atomic transport refactor S8: identity-token handler validator parame…
marcschier cea2f10
Type-swap ApplicationConfiguration/ServerBase.CertificateValidator to…
marcschier d86bd8a
Drop dedicated CertificateValidator from discovery registration; shar…
marcschier f8a70f4
Replace transient CertificateValidator with X509Chain in CSR signing …
marcschier f41f4c9
Mark CertificateValidator class, ICertificateValidator interface, Cer…
marcschier f25016d
Mark ApplicationConfiguration/ServerBase legacy properties [Obsolete]…
marcschier 3ee336c
Update Certificates docs for full obsolete cascade (S20)
marcschier 61c84e6
Add global AcceptError property on ICertificateValidatorEx; migrate s…
marcschier 3342e74
Document new ICertificateValidatorEx.AcceptError global property
marcschier 0774842
Make CertificateTypesProvider registry-backed when constructed with a…
marcschier 020885f
Remove union attribution until c#15
marcschier bbef98c
CertificateManager: propagate SecurityConfiguration validation flags …
marcschier c9f3f42
Merge branch 'x509' of https://github.com/OPCFoundation/UA-.NETStanda…
marcschier 601f5e8
CertificateManager: skip empty trust-list paths in MapFromSecurityCon…
marcschier d0f9358
Remove global.json
marcschier b0f4b21
Merge remote-tracking branch 'origin/master' into x509
marcschier ac96967
Fix CI failures: SerializableVariant.Equals object dispatch + cert ho…
marcschier 85d29ea
Merge remote-tracking branch 'origin/master' into x509
Copilot cac48ea
Replace file-level CS0618 pragmas with narrow per-call wrappers
Copilot 0a56aee
Address PR review: refresh registry on cert update + fix CA2000 in Co…
marcschier 18360dc
Pin HTTPS TLS certificates to listener/channel lifetime to fix concur…
marcschier 5825799
CertificateManager: synchronize m_applicationCertificates and validat…
marcschier 5caf6a4
Add [Retry(3)] to concurrent NodeCache stress tests on HTTPS variants
marcschier 9fd866a
Increase retry on concurrent NodeCache stress tests from 3 to 5
marcschier 0cea7c3
Skip concurrent NodeCache stress tests on HTTPS variants
marcschier 2b8119f
Merge remote-tracking branch 'origin/master' into x509
marcschier f5bbe41
test: stabilize Client CI flakes after master merge
marcschier 85819b7
fix(tcp-listener): send fault response on request handler exception
marcschier 940069e
Implement Phases 1, 2, 5, 6, 7 of the certificate-manager migration
Copilot 1b06c30
Phase 3: retire CertificateTypesProvider from transports
Copilot 59499e9
Phase 4: drop ApplicationConfiguration.CertificateValidator init
Copilot ada475c
cleanup
marcschier 6fd4d6a
Phase 1 cleanup (partial): add new validation knobs to CertificateMan…
Copilot 51cffcb
Update CertificateManagerMigration doc to reflect current state
Copilot 66695c1
cleanup
marcschier 4143505
cleanup
marcschier a14861a
cleanup
marcschier f71b84c
cleanup
marcschier 5a20a7a
cleanup
marcschier 0117cd0
Phase 1 finish: retire TemporaryCertValidator
Copilot 60f113a
Phase B (partial Phase 8): delete CertificateValidator obsolete forwa…
Copilot eed6457
cleanup
marcschier 4937735
cleanup
marcschier c62fe4e
Phase 8 commit A: add CertificateValidationCore + helpers
Copilot 1bfac87
Phase 8 commit B: CertificateManager uses CertificateValidationCore
Copilot f52437e
Phase 8 commit C: centralise rejected-store enqueue in CertificateMan…
Copilot ac99543
Phase 8 commit D: simplify CertificateValidationExtensions
Copilot cf0137c
Phase 8 commit E: retire X509TestUtils legacy validator usage
Copilot 8221e66
Phase 8 commit F: delete the legacy CertificateValidator bridge
Copilot e0b2e13
Remove CertificateManagerMigration.md now that migration is complete
Copilot c5eceae
fix: NRE on PubSub Mqtt dispose and ReferenceServer node-manager dispose
marcschier 2f2e443
test(SubscriptionTests): fix indefinite hang in OnKeepAlive callback
marcschier c940966
cleanup
marcschier 3d098c3
cleanup
marcschier 0058563
Merge remote-tracking branch 'origin/x509' into x509
Copilot dd19d1c
fix: resolve baseline analyzer errors blocking RunAnalyzersDuringBuild
Copilot 4e58ef3
style: dotnet format whitespace
Copilot f444c09
fix(server): share CertificateManager across ServerBase, refresh cert…
marcschier 10bf85f
style: dotnet format style IDE0032 IDE0049 (using directive ordering)
Copilot 10f823b
style: dotnet format analyzers RCS1043 RCS1061 RCS1090
Copilot 0950240
style: dotnet format analyzers RCS1132 RCS1140 RCS1142
Copilot 4c74b7e
refactor(certs): add CertificateIdentifierResolver helper (additive)
marcschier 29ee58a
style: dotnet format analyzers RCS1049 RCS1085
Copilot d758800
style: dotnet format analyzers RCS1249 RCS1252
Copilot 5d5690b
style: dotnet format analyzers RCS0027 RCS0029
Copilot d939ffa
style: dotnet format analyzers RCS0050 RCS1186
Copilot 60c7c77
refactor(certs): route CertificateManager + GDS push through resolver
marcschier 9cad019
style: dotnet format analyzers NUnit2009 NUnit2010
Copilot 682145d
docs: add skill.md for the dotnet format cleanup recipe
Copilot 0997980
update
marcschier 5818b53
Merge remote-tracking branch 'origin/x509' into x509
marcschier 2139d76
fix(certs): in-memory CertificateIdentifier(cert) fallback in resolver
marcschier 1af0d94
refactor(certs): migrate UserIdentity, GDS server, ConsoleReferenceCl…
marcschier eff3a94
fix(certs): restore in-memory cert fast-path in resolver LoadPrivateK…
Copilot 8ead710
Merge branch 'x509' of https://github.com/OPCFoundation/UA-.NETStanda…
Copilot 5809788
Phase 1e: route trust list / validator / SecurityConfiguration throug…
marcschier 5e5b9c2
Phase 2-validator: replace CertificateIdentifier issuer wrappers with…
marcschier c7610c6
Phase 2-collection + p2-secconfig: refactor CertificateIdentifierColl…
marcschier 87f8558
Phase 3+4+5: strip CertificateIdentifier cache, migrate consumers, up…
marcschier 0b73a51
fix(codeql): wrap certificate log args in Redact.Create
marcschier 86b7272
fix(codeql): wrap StorePath log args in Redact.Create
marcschier bcde66f
feat(certs): add CertificateValidationResult.ThrowIfInvalid()
Copilot d5ce378
docs(certs): clarify default TrustListIdentifier in ValidateAsync
Copilot 88dd845
docs(certs): replace stale references to removed legacy types
Copilot 71c242e
test(certs): partial Phase 9 test gaps (issuer mutation, refcount, Ac…
marcschier 9dcdaa2
test(certs): add coverage for CertificateIdentifierResolver and Certi…
marcschier 78614d3
refactor(identity): convert IUserIdentityTokenHandler operations to a…
marcschier 0717525
feat(secrets): add Secret/SecretIdentifier/ISecretStore infrastructure
marcschier a1230a5
refactor(certs): wire CertificatePasswordProvider through ISecretRegi…
marcschier 429ade6
feat(certs): add cache-first ICertificateProvider on CertificateManager
marcschier ba22f00
feat(identity): add CertificateIdentifier ctor on X509IdentityTokenHa…
marcschier 1420f5c
refactor(identity): drop IDisposable from UserIdentity and IUserIdent…
marcschier 406bc63
docs(migration): document Phase 10 IUserIdentity refactor
marcschier db6c03a
test(certs): guard CertificateProvider warm-path assertion behind NET…
marcschier 1948eab
Merge remote-tracking branch 'origin/x509' into x509
marcschier 3eb765c
style(certs): wrap LogInformation call in DirectoryCertificateStore
marcschier efc276d
update
marcschier ef1e307
style(fmt): batch 1 RCS auto-fix safe set
marcschier ad96e98
style(fmt): batch 2 RCS structural (RCS1181, RCS1189)
marcschier 57dea84
style(fmt): batch 3 RCS manual triage (RCS1130, RCS1213)
marcschier 41361e3
style(fmt): batch 4 NUnit (NUnit2010, NUnit2014, NUnit2043, NUnit2046…
marcschier 7f81d2a
style(fmt): batch 10 CA2025 false-positive suppressions
marcschier 1889a94
style(fmt): batch 11 CA2213 + CA1001 disposable patterns
marcschier 39915f3
style(fmt): batch 12 CA2007 file-level suppressions in test projects
marcschier f2ce767
style(fmt): batch 13 CA2000 file-level suppressions
marcschier 46325de
style(fmt): batch 6 - CA tail (CA1850/CA5394/CA1868/CA1816/CA1823/CA2…
marcschier f7c68de
style(fmt): batch 7 - CA2263 + CA2016
marcschier be818ae
style(fmt): batch 8 - CA1859 (use concrete types)
marcschier fc1256b
style(fmt): batch 9 - CA1508 (avoid dead conditional code)
marcschier c6e5e4e
fix: address PR #3688 review feedback
marcschier 139d7ca
fix: revert per-cert-type core invalidation (keeps GDS push tests green)
marcschier 9331455
fix subscription
marcschier f0ba674
style(fmt): batch 14 - non-IDE info diagnostics
marcschier 430dfa7
test: complete FakeManagedSubscription stub for new ISubscription mem…
marcschier 4fda710
style(fmt): batch 15 - IDE0005/0007/0008 (using/var)
marcschier 38e9ad6
style(fmt): batch 16 - IDE0001/0002/0003/0370 (name simplification)
marcschier 2c2fed8
style(fmt): batch 17 - IDE0004/0040/0055/0090/0200 (cast/modifier/for…
marcschier 08bff05
style(fmt): batch 18 - IDE0028/0031/0063/0300/0301/0305 (collections+…
marcschier 3a7048a
style(fmt): batch 19 - IDE0016/0017/0019/0022/0270/0078 (pattern+thro…
marcschier 377ae11
style(fmt): batch 20 - bodied + functions
marcschier 8aab2ec
style(fmt): batch 21 - IDE0330 (use System.Threading.Lock)
marcschier bcd2035
style(fmt): batch 22 - disable IDE0360 (primary constructor)
marcschier 8ccd59e
style(fmt): residual cleanup of IDE0004/0005/0008/0062/0079/0270/0301…
marcschier aeda3b0
style(fmt): batch 23 - IDE0051/0052 (unused private members)
marcschier 2a61b74
style(fmt): batch 24 - IDE0059 (unnecessary value assignment)
marcschier 3923984
style(fmt): batches 25-27 - editorconfig severity policy + residual c…
marcschier 780b45b
style(asyncdispose): batches 29-30 - SuppressFinalize + AOT async ses…
marcschier c95de3a
style(asyncdispose): batch 31 - production await using ConfigureAwait
marcschier 574254e
style(asyncdispose): batch 32 - tests await using ConfigureAwait (heavy)
marcschier 5016246
style(asyncdispose): batch 33 - tests await using ConfigureAwait (rem…
marcschier ce6bd7d
merge: master into x509 (PR #3688) - pick up #3747
marcschier f1de6cb
ci: empty commit to retrigger flaky CI
marcschier e6754c8
fix(certs): tighten certificate lifetimes and enforce leak detection
marcschier 49dec98
fix(certs): additional certificate leak fixes (round 2)
marcschier 55f2e88
fix(certs): dispose Server.Session m_clientIssuerCertificates and cle…
marcschier 10845b1
fix(certs): dispose Session in 3 OpenSessionECC* tests with using
marcschier b046136
fix(certs): make GlobalDiscoveryTestServer IAsyncDisposable
marcschier 7663ed9
fix(certs): dispose ApplicationInstance in AotServerFixture.StopAsync
marcschier c8a1fe4
fix(ci): downgrade leak detection from Assert.Fail to Warn
marcschier 388d415
more cleanup
marcschier eb7ef3f
more cleanup
marcschier 2d024c4
Remove idisposable from nodestate
marcschier a8a1409
Merge remote-tracking branch 'origin/master' into x509
marcschier 8c25c75
Fix build
marcschier 793374b
fix(ci): make AOT TestReport artifact name unique per matrix OS
marcschier d2bba30
update packages
marcschier d2c1045
ci: empty commit to retrigger stuck Azure DevOps build
marcschier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.