Repository navigation
V2 OV: register a new Organization Representative from template parameters - #42
Open
spbsoluble wants to merge 2 commits into
Open
spbsoluble wants to merge 2 commits into
spbsoluble wants to merge 2 commits into
Conversation
… parameters OrgRepresentativeName/Email (together) plus optional Phone/Designation/EmployeeId send organization.useNewOrgRepresentative=true with an organizationRepresentative block on a V2 OV create. ValidateProductInfo and EnrollV2CoreAsync share one check that mirrors CERTInext's rules before any CA call: OV only (EMS-1315), a pre-vetted organization (EMS-1316), name and email together (EMS-1319/1320), one email, phone 6-15 digits (EMS-1321). Error messages name parameters, never values. V1 ignores them (warns at save); a reissue doesn't send them. The create response's organizationRepresentativeStatus is logged; pendingOrganizationRepresentative is kept raw (undocumented shape) and only its presence logged. Personal data: employeeId and the block keys join PersonalOtherFieldNames, and emails inside CA error text (detail/title/message/errorMessage) in logged bodies are now masked; an EMS-1317 error echoing the representative's email used to reach the Warning-level V2 non-success line unmasked.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Plan:
issues/0096-v2-followups-round2-plan.md, item 5 (item 6 inissues/0094). Stacked on #40, separate from #41 because it handles personal data.What it does
OrgRepresentativeName,OrgRepresentativeEmail,OrgRepresentativePhone,OrgRepresentativeDesignation,OrgRepresentativeEmployeeId. Name and Email together sendorganization.useNewOrgRepresentative: trueplusorganization.organizationRepresentative. Without them, both fields are omitted and the OV body is byte-identical to today (golden tests unchanged).ValidateOrgRepresentativeParams) used byValidateProductInfoat template save and byEnrollV2CoreAsyncbefore any CA call. It mirrors the spec's create-description rules:OrganizationNumber(EMS-1316).LooksLikeEmailAddress.+and-.()(EMS-1321). There was no existing phone helper to reuse, soIsValidRepresentativePhoneis new.V2CreateOrderResponse.OrganizationRepresentativeStatus(applied/pending-approval) is logged at Information.PendingOrganizationRepresentativeis a rawJsonElement?, because its shape is undocumented and a typed mismatch would throw after the order exists. Only its presence is logged.Personal data
PersonalOtherFieldNames/PersonalEmailFieldNames.employeeId, plusorganizationRepresentativeandpendingOrganizationRepresentativein case CERTInext ever returns either as a string.detail. The exception message was masked, but the Warning-levelCERTInext V2 API non-success … ResponseBody=line and the Trace response dump weren't.RedactPersonalDatanow masks emails insidedetail/title/message/errorMessagestring values, via a newLogSanitizer.MaskEmailsInText, which sharesSanitizeCaText's regex. This affects every V2 error body, not just EMS-1317 (for example, a requestor email echoed in an error).Testing
dotnet test CERTInext.Tests -c Release1333 passed (baseline 1296 + 37 new); theDcvSupport=falsebuild runs 1252, all passed.dotnet build -c Release --no-incrementaland the same with-p:DcvSupport=false, 0 warnings / 0 errors.V2OrgRepresentativeTests: rule matrix, phone rule, exact organization-block wire JSON, optional keys omitted, no-representative body unchanged, DV/EV fail-fast with no CA calls, the pending-approval log line, and no representative value in any plugin log line.ValidateProductInforeject/accept.RedactPersonalDataTests: the request block, the pending response, and a string-valued block.ClientPayloadLogRedactionTests: a new V2 WireMock section covering the Trace request/response dumps with the flag off and on, and a 422 EMS-1317 echo with no unmasked email in any client line.Live
Not run. A live OV order needs an SSL.com-validated organization, the sandbox reports
NOT_SUBMITTED, and the plan says to ask first. Unit, WireMock and golden-body tests are the proof.Open questions / for review
SslOrganizationRepresentativealso lists anemptyboolean, which looks like a Java serializer artifact. It's never sent. Should CERTInext be asked about it?pendingOrganizationRepresentativeno schema. Should it be added toanalysis/v2-api-support-questions.mdas a question?enrollment_configentries carry onlyname/description, like every existing entry. I didn't add therequired/example/defaultkeys the plan mentions, because no other enrollment parameter has them.