BC Idea Link
https://experience.dynamics.com/ideas/idea/?ideaid=fd67396e-8611-f111-83da-7c1e52e1aefa
Description
Table 1262 "Isolated Certificate" allows for uploading certificates and passwords into Isolated Storage.
Codeunit 1259 "Certificate Management" contains various procedures for working with the stored certificates through the records in table 1262.
The procedures in this codeunit are mostly marked as [Scope('OnPrem')], making them unusable for AppSource apps.
This limits the usage of the certificates uploaded through table 1262, requiring partners to make their own alternative certificate (password) storage solutions if the included functionality is not adequate.
One situation in which the included functionality is not adequate, is when using a password protected p12 certificate file to authenticate webservice calls through codeunit 2350 "Rest Client".
The Rest Client requires the base64-encoded certificate, and the password. The currently available procedure GetRawCertDataAsBase64String in the Certificate Management codeunit does not meet these requirements, even if providing the password through other means.
This idea proposes removing the [Scope('OnPrem')] attribute on two procedures in the "Certificate Management" codeunit:
GetCertAsBase64String(IsolatedCertificate: Record "Isolated Certificate"): Text
GetPasswordAsSecret(IsolatedCertificate: Record "Isolated Certificate") StoredPassword: SecretText
An alternative implementation (as suggested by @adrogin) could be to add an overload for the AddCertificate procedure, that takes an Isolated Certificate record as parameter.
i.e. procedure AddCertificate(IsolatedCertificate: Record "Isolated Certificate")
I will provide the implementation for this BC Idea
BC Idea Link
https://experience.dynamics.com/ideas/idea/?ideaid=fd67396e-8611-f111-83da-7c1e52e1aefa
Description
Table
1262 "Isolated Certificate"allows for uploading certificates and passwords into Isolated Storage.Codeunit
1259 "Certificate Management"contains various procedures for working with the stored certificates through the records in table 1262.The procedures in this codeunit are mostly marked as
[Scope('OnPrem')], making them unusable for AppSource apps.This limits the usage of the certificates uploaded through table 1262, requiring partners to make their own alternative certificate (password) storage solutions if the included functionality is not adequate.
One situation in which the included functionality is not adequate, is when using a password protected p12 certificate file to authenticate webservice calls through
codeunit 2350 "Rest Client".The Rest Client requires the base64-encoded certificate, and the password. The currently available procedure
GetRawCertDataAsBase64Stringin the Certificate Management codeunit does not meet these requirements, even if providing the password through other means.This idea proposes removing the
[Scope('OnPrem')]attribute on two procedures in the "Certificate Management" codeunit:GetCertAsBase64String(IsolatedCertificate: Record "Isolated Certificate"): TextGetPasswordAsSecret(IsolatedCertificate: Record "Isolated Certificate") StoredPassword: SecretTextAn alternative implementation (as suggested by @adrogin) could be to add an overload for the
AddCertificateprocedure, that takes anIsolated Certificaterecord as parameter.i.e.
procedure AddCertificate(IsolatedCertificate: Record "Isolated Certificate")I will provide the implementation for this BC Idea