Примеры отображаемых данных
В данном разделе приведены примеры настройки и внешнего вида кратких сведений об операциях:
- подписи
- расшифрования
- входа пользователя
- создания запроса на сертификат
- удаления сертификата
- отзыве сертификата
- изменении ПИН-кода на сертификат
- Cloud CSP: расшифрования
- CLoud CSP: аутентификации на сайте по сертификату
В конце раздела приведён скрипт настройки кратких сведений о перечисленных операциях.
Подпись
Ниже представлены различные виды отображения кратких сведений о подписываемом документе. По умолчанию отображается имя документа, переданное при загрузке:
Пример настройки шаблона:
Плагин для формирования кратких сведений должен быть зарегистрирован с идентификатором (-FileExtension) preview_@default_html
.
Данный плагин будет применяться ко всем документа, для которых не зарегистировано иных плагинов формирования кратких сведений о документах.
Регистрация нового плагина:
$stsDisplayName = "STS"
$dsDisplayName = "DocumentStore"
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ /* defaults to dark theme */ body {{ --bg-color: rgb(18,18,18); }} body.light-theme {{ --bg-color: #fff; }} .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; align-self: center; }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 13px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }}</style><title>Document</title></head><body><div class="page"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M26 5H10C8.34372 5 7 6.34372 7 8V28C7 29.6563 8.34372 31 10 31H26C27.6563 31 29 29.6563 29 28V8C29 6.34372 27.6563 5 26 5ZM10 7H26C26.5517 7 27 7.44828 27 8V28C27 28.5517 26.5517 29 26 29H10C9.44828 29 9 28.5517 9 28V8C9 7.44828 9.44828 7 10 7ZM19 23V21H12V23H19ZM24 11V13H12V11H24ZM24 18V16H12V18H24Z" fill="#148F2B"/></svg></div> <div class="main-header-content"><span class="main-header-date">Имя документа</span><span class="main-header-title">{0:Name}</span></div></div></div></body> </html>'
Add-DssDocumentStoreConverterPlugin -DisplayName $dsDisplayName -Assembly DSS.DocumentConverter.Preview.dll -Classname DSS.DocumentConverter.Preview.PreviewConverter -FileExtension preview_@default_html -Parameters @{ "snippetTemplate" = $snippetTmpl.ToString(); "skipUnknownKeys"="true"; "noDocument"="true"; "ConvertationType"="DocumentInfo" }
Restart-DssDocumentStoreInstance -DisplayName $dsDisplayName
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","certid": "{0:CertificateID}", "sessionid":"{0:SessionId}","optype":"Подпись"}},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя","certid":"Идентификатор сертификата","sessionid":"Идентификатор запроса","optype":"Операция"}}}}'
$template = Get-DssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthSign -Destination MyDssAuth -Recipient User
Set-DssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -Template $descriptionTmpl
Restart-DssStsInstance -DisplayName $stsDisplayName
Изменение настроек существующего плагина
$stsDisplayName = "STS"
$dsDisplayName = "DocumentStore"
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ /* defaults to dark theme */ body {{ --bg-color: rgb(18,18,18); }} body.light-theme {{ --bg-color: #fff; }} .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; align-self: center; }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 13px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }}</style><title>Document</title></head><body><div class="page"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M26 5H10C8.34372 5 7 6.34372 7 8V28C7 29.6563 8.34372 31 10 31H26C27.6563 31 29 29.6563 29 28V8C29 6.34372 27.6563 5 26 5ZM10 7H26C26.5517 7 27 7.44828 27 8V28C27 28.5517 26.5517 29 26 29H10C9.44828 29 9 28.5517 9 28V8C9 7.44828 9.44828 7 10 7ZM19 23V21H12V23H19ZM24 11V13H12V11H24ZM24 18V16H12V18H24Z" fill="#148F2B"/></svg></div> <div class="main-header-content"><span class="main-header-date">Имя документа</span><span class="main-header-title">{0:Name}</span></div></div></div></body> </html>'
Set-DssDocumentStoreConverterPlugin -DisplayName $dsDisplayName -FileExtension preview_@default_html -Parameters @{ "snippetTemplate" = $snippetTmpl.ToString(); "skipUnknownKeys"="true"; "noDocument"="true"; "ConvertationType"="DocumentInfo" }
Restart-DssDocumentStoreInstance -DisplayName $dsDisplayName
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","certid": "{0:CertificateID}", "sessionid":"{0:SessionId}","optype":"Подпись"}},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя","certid":"Идентификатор сертификата","sessionid":"Идентификатор запроса","optype":"Операция"}}}}'
$template = Get-DssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthSign -Destination MyDssAuth -Recipient User
Set-DssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -Template $descriptionTmpl
Restart-DssStsInstance -DisplayName $stsDisplayName
На плашке документа возможно отобразить и другие сведения. Дополнительные данные могут быть извлечены из подписываемого документа, либо быть переданы при загрузке документа.
Дополнительные сведения передаются в структуре AdditionalInfo
.
В шаблоне данные параметры передаются как {0:AdditionalInfo.ParameterName}
, где ParameterName
-
имя параметра в словаре AdditionalInfo
.
Примечание
Если в шаблон добавлены дополнительные сведения (AdditionalInfo
),
то по умолчанию они будут являться обязательными для всех документов, обрабатываемых плагином.
Для документов, загруженных без указания данных параметров, нельзя будет сформировать краткие сведения (snippet), так как
формирование кратких сведений будет завершаться ошибкой следующего вида: "Встречено значение неизвестного ключа: [AdditionalInfo.ParameterName]".
Данное поведение может быть нежелательным, так как только для определенных документов требуется отображать дополнительные сведения.
Для того чтобы дополнительные поля шаблона были опциональными, необходимо в настройках плагина указать флаг
skipUnknownKeys
=true.
Примечание
Для извлечения отображаемых данных из документа может потребоваться разработать соответствующий плагин.
Вход пользователя
Ниже приведён пример отображаемых данных при входе пользователя.
Пример настройки шаблона:
$stsDisplayName = "STS"
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15,3H9A3,3 0 0,0 6,6V10H7V6A2,2 0 0,1 9,4H15A2,2 0 0,1 17,6V19A2,2 0 0,1 15,21H9A2,2 0 0,1 7,19V15H6V19A3,3 0 0,0 9,22H15A3,3 0 0,0 18,19V6A3,3 0 0,0 15,3M3,12H13.25L10,8.75L10.66,8L15.16,12.5L10.66,17L10,16.25L13.25,13H3V12Z" stroke="#148F2B"/></svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите вход пользователя</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Время входа</span><span class="page-info-value">{0:Date:Date::ZGQuTU0ueXl5eSBoaDptbTpzcw==}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Вход пользователя" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции"}}}}'
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthLogin
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
Restart-DssStsInstance -DisplayName $stsDisplayName
Подтверждение создания запроса на сертификат
Ниже приведён пример отображаемых данных при создании запроса на сертификат.
Пример настройки шаблона:
$stsDisplayName = "STS"
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ margin: 0px; 0px; 0px; 0px }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.25 7.25H11.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 4.75H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 10.25H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M19.5 3.25V18.25C19.5 19.4926 18.4926 20.5 17.25 20.5H3.25C2.00736 20.5 1 19.4926 1 18.25V3.25C1 2.00736 2.00736 1 3.25 1H10.25H17.25C18.4926 1 19.5 2.00736 19.5 3.25Z" stroke="#148F2B" stroke-width="1.5"/><path d="M15.5891 13.9308C16.0251 13.4358 16.2877 12.8005 16.2877 12.1088C16.2877 10.5325 14.9251 9.25 13.2503 9.25C11.5755 9.25 10.2128 10.5323 10.2128 12.1088C10.2128 12.8005 10.4753 13.4357 10.9115 13.9308L9.2951 16.7748C9.216 16.9137 9.2428 17.085 9.3609 17.1969C9.4793 17.3087 9.6611 17.3347 9.8092 17.2611L10.9966 16.6707L11.1338 17.928C11.147 18.0489 11.2234 18.1524 11.3332 18.2076C11.3658 18.2241 11.4014 18.2362 11.4392 18.2433C11.6035 18.2736 11.7697 18.1995 11.8488 18.0606L13.2502 15.595L14.6513 18.0606C14.7303 18.1995 14.8965 18.2736 15.0608 18.2433C15.0987 18.2362 15.1344 18.2242 15.167 18.2076C15.2767 18.1524 15.3533 18.0488 15.3664 17.928L15.5038 16.6707L16.6911 17.2611C16.8389 17.3347 17.021 17.3087 17.1392 17.1969C17.2572 17.085 17.2839 16.9137 17.2049 16.7748L15.5891 13.9308ZM13.2505 13.5557C12.4028 13.5557 11.713 12.9067 11.713 12.1088C11.713 11.3109 12.4026 10.6618 13.2505 10.6618C14.0981 10.6618 14.7879 11.3107 14.7879 12.1088C14.7878 12.9066 14.0982 13.5557 13.2505 13.5557Z" fill="#148F2B"/></svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите создание запроса на сертификат</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Имя субъекта</span><span class="page-info-value">{0:CertSubjectName}</span></div><div class="page-info"><span class="page-info-name">Шаблон</span><span class="page-info-value">{0:CertTemplateName}</span></div><div class="page-info"><span class="page-info-name">Издатель</span><span class="page-info-value">{0:CAName}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl = '{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Выпуск сертификата" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции"}}}}'
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthCreateRequest
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
Restart-DssStsInstance -DisplayName $stsDisplayName
Подтверждение удаления сертификата
Ниже приведён пример отображаемых данных при удалении сертификата.
Пример настройки шаблона:
$stsDisplayName = "STS"
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ margin: 8px; 8px; 0px; 0px }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.25 7.25H11.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 4.75H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 10.25H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M19.5 3.25V18.25C19.5 19.4926 18.4926 20.5 17.25 20.5H3.25C2.00736 20.5 1 19.4926 1 18.25V3.25C1 2.00736 2.00736 1 3.25 1H10.25H17.25C18.4926 1 19.5 2.00736 19.5 3.25Z" stroke="#148F2B" stroke-width="1.5"/><path d="M15.5891 13.9308C16.0251 13.4358 16.2877 12.8005 16.2877 12.1088C16.2877 10.5325 14.9251 9.25 13.2503 9.25C11.5755 9.25 10.2128 10.5323 10.2128 12.1088C10.2128 12.8005 10.4753 13.4357 10.9115 13.9308L9.2951 16.7748C9.216 16.9137 9.2428 17.085 9.3609 17.1969C9.4793 17.3087 9.6611 17.3347 9.8092 17.2611L10.9966 16.6707L11.1338 17.928C11.147 18.0489 11.2234 18.1524 11.3332 18.2076C11.3658 18.2241 11.4014 18.2362 11.4392 18.2433C11.6035 18.2736 11.7697 18.1995 11.8488 18.0606L13.2502 15.595L14.6513 18.0606C14.7303 18.1995 14.8965 18.2736 15.0608 18.2433C15.0987 18.2362 15.1344 18.2242 15.167 18.2076C15.2767 18.1524 15.3533 18.0488 15.3664 17.928L15.5038 16.6707L16.6911 17.2611C16.8389 17.3347 17.021 17.3087 17.1392 17.1969C17.2572 17.085 17.2839 16.9137 17.2049 16.7748L15.5891 13.9308ZM13.2505 13.5557C12.4028 13.5557 11.713 12.9067 11.713 12.1088C11.713 11.3109 12.4026 10.6618 13.2505 10.6618C14.0981 10.6618 14.7879 11.3107 14.7879 12.1088C14.7878 12.9066 14.0982 13.5557 13.2505 13.5557Z" fill="#148F2B"/></svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите удаление сертификата</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Имя субъекта</span><span class="page-info-value">{0:CertSubjectName}</span></div> <div class="page-info"><span class="page-info-name">Издатель</span><span class="page-info-value">{0:CertIssuerName}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Удаление сертификата","certid": "{0:CertificateID}" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции","certid":"Идентификатор сертификата"}}}}'
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthDeleteCert
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
Restart-DssStsInstance -DisplayName $stsDisplayName
Примеры отображаемых данных для Cloud CSP
Ниже приведён пример отображаемых данных при расшифровании документа через Cloud CSP.
Пример настройки шаблона:
$stsDisplayName = "STS"
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.75 8.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M15.75 0a8.25 8.25 0 1 1-2.541 16.101l-1.636 1.636a1.744 1.744 0 0 1-1.237.513H9.25a.25.25 0 0 0-.25.25v1.448a.876.876 0 0 1-.256.619l-.214.213a.75.75 0 0 1-.545.22H5.25a.25.25 0 0 0-.25.25v1A1.75 1.75 0 0 1 3.25 24h-1.5A1.75 1.75 0 0 1 0 22.25v-2.836c0-.464.185-.908.513-1.236l7.386-7.388A8.249 8.249 0 0 1 15.75 0ZM9 8.25a6.733 6.733 0 0 0 .463 2.462.75.75 0 0 1-.168.804l-7.722 7.721a.25.25 0 0 0-.073.177v2.836c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-1c0-.966.784-1.75 1.75-1.75H7.5v-1c0-.966.784-1.75 1.75-1.75h1.086a.25.25 0 0 0 .177-.073l1.971-1.972a.75.75 0 0 1 .804-.168A6.75 6.75 0 1 0 9 8.25Z" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/> </svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите доступ к закрытому ключу</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Имя субъекта</span><span class="page-info-value">{0:CertSubjectName}</span></div><div class="page-info"><span class="page-info-name">Издатель</span><span class="page-info-value">{0:CertIssuerName}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Доступ к ЗК","certid": "{0:CertificateID}" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции","certid":"Идентификатор сертификата"}}}}'
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthPrivateKeyAccess
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
Restart-DssStsInstance -DisplayName $stsDisplayName
Ниже приведён пример отображаемых данных при аутентификации на Веб-сайте по сертификату через Cloud CSP.
Пример настройки шаблона:
$dsDisplayName = "DocumentStore"
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15,3H9A3,3 0 0,0 6,6V10H7V6A2,2 0 0,1 9,4H15A2,2 0 0,1 17,6V19A2,2 0 0,1 15,21H9A2,2 0 0,1 7,19V15H6V19A3,3 0 0,0 9,22H15A3,3 0 0,0 18,19V6A3,3 0 0,0 15,3M3,12H13.25L10,8.75L10.66,8L15.16,12.5L10.66,17L10,16.25L13.25,13H3V12Z" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/></svg></div><div class="main-header-content"><span class="main-header-title">Вход на сайт с сертификатом выданным для</span></div></div></div>{0:TableRow_DnsNames_0}</div></div></body><![CDATA[{ "TableRow_DnsNames": { "0": "<div class=\"page-info\"><span class=\"page-info-value\">{0:TABLES.DnsNames.#i.Name}</span></div>"} }]]></html>'
Add-DssDocumentStoreConverterPlugin -DisplayName $dsDisplayName -FileExtension preview_cloudtls_html -Parameters @{ "snippetTemplate" = $snippetTmpl.ToString(); "skipUnknownKeys"="true"; "noDocument"="true"; "ConvertationType"="CloudTls" } -Assembly DSS.DocumentConverter.Preview.dll -Classname DSS.DocumentConverter.Preview.PreviewConverter
Restart-DssDocumentStoreInstance -DisplayName $dsDisplayName
Пример настройки шаблонов отображаемых данных
$dsDisplayName = "androidds"
$stsDisplayName = "androididp"
# Настройка шаблонов отображаемых данных для операций без документов
# 1. Подтверждение выпуска сертификата
## Шаблон плашки и сведений об операции
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ margin: 0px; 0px; 0px; 0px }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.25 7.25H11.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 4.75H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 10.25H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M19.5 3.25V18.25C19.5 19.4926 18.4926 20.5 17.25 20.5H3.25C2.00736 20.5 1 19.4926 1 18.25V3.25C1 2.00736 2.00736 1 3.25 1H10.25H17.25C18.4926 1 19.5 2.00736 19.5 3.25Z" stroke="#148F2B" stroke-width="1.5"/><path d="M15.5891 13.9308C16.0251 13.4358 16.2877 12.8005 16.2877 12.1088C16.2877 10.5325 14.9251 9.25 13.2503 9.25C11.5755 9.25 10.2128 10.5323 10.2128 12.1088C10.2128 12.8005 10.4753 13.4357 10.9115 13.9308L9.2951 16.7748C9.216 16.9137 9.2428 17.085 9.3609 17.1969C9.4793 17.3087 9.6611 17.3347 9.8092 17.2611L10.9966 16.6707L11.1338 17.928C11.147 18.0489 11.2234 18.1524 11.3332 18.2076C11.3658 18.2241 11.4014 18.2362 11.4392 18.2433C11.6035 18.2736 11.7697 18.1995 11.8488 18.0606L13.2502 15.595L14.6513 18.0606C14.7303 18.1995 14.8965 18.2736 15.0608 18.2433C15.0987 18.2362 15.1344 18.2242 15.167 18.2076C15.2767 18.1524 15.3533 18.0488 15.3664 17.928L15.5038 16.6707L16.6911 17.2611C16.8389 17.3347 17.021 17.3087 17.1392 17.1969C17.2572 17.085 17.2839 16.9137 17.2049 16.7748L15.5891 13.9308ZM13.2505 13.5557C12.4028 13.5557 11.713 12.9067 11.713 12.1088C11.713 11.3109 12.4026 10.6618 13.2505 10.6618C14.0981 10.6618 14.7879 11.3107 14.7879 12.1088C14.7878 12.9066 14.0982 13.5557 13.2505 13.5557Z" fill="#148F2B"/></svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите создание запроса на сертификат</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Имя субъекта</span><span class="page-info-value">{0:CertSubjectName}</span></div><div class="page-info"><span class="page-info-name">Шаблон</span><span class="page-info-value">{0:CertTemplateName}</span></div><div class="page-info"><span class="page-info-name">Издатель</span><span class="page-info-value">{0:CAName}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl = '{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Выпуск сертификата" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции"}}}}'
## Установка шаблона
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthCreateRequest
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
# 2. Подтверждение удаления сертификата
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ margin: 8px; 8px; 0px; 0px }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.25 7.25H11.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 4.75H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 10.25H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M19.5 3.25V18.25C19.5 19.4926 18.4926 20.5 17.25 20.5H3.25C2.00736 20.5 1 19.4926 1 18.25V3.25C1 2.00736 2.00736 1 3.25 1H10.25H17.25C18.4926 1 19.5 2.00736 19.5 3.25Z" stroke="#148F2B" stroke-width="1.5"/><path d="M15.5891 13.9308C16.0251 13.4358 16.2877 12.8005 16.2877 12.1088C16.2877 10.5325 14.9251 9.25 13.2503 9.25C11.5755 9.25 10.2128 10.5323 10.2128 12.1088C10.2128 12.8005 10.4753 13.4357 10.9115 13.9308L9.2951 16.7748C9.216 16.9137 9.2428 17.085 9.3609 17.1969C9.4793 17.3087 9.6611 17.3347 9.8092 17.2611L10.9966 16.6707L11.1338 17.928C11.147 18.0489 11.2234 18.1524 11.3332 18.2076C11.3658 18.2241 11.4014 18.2362 11.4392 18.2433C11.6035 18.2736 11.7697 18.1995 11.8488 18.0606L13.2502 15.595L14.6513 18.0606C14.7303 18.1995 14.8965 18.2736 15.0608 18.2433C15.0987 18.2362 15.1344 18.2242 15.167 18.2076C15.2767 18.1524 15.3533 18.0488 15.3664 17.928L15.5038 16.6707L16.6911 17.2611C16.8389 17.3347 17.021 17.3087 17.1392 17.1969C17.2572 17.085 17.2839 16.9137 17.2049 16.7748L15.5891 13.9308ZM13.2505 13.5557C12.4028 13.5557 11.713 12.9067 11.713 12.1088C11.713 11.3109 12.4026 10.6618 13.2505 10.6618C14.0981 10.6618 14.7879 11.3107 14.7879 12.1088C14.7878 12.9066 14.0982 13.5557 13.2505 13.5557Z" fill="#148F2B"/></svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите удаление сертификата</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Имя субъекта</span><span class="page-info-value">{0:CertSubjectName}</span></div> <div class="page-info"><span class="page-info-name">Издатель</span><span class="page-info-value">{0:CertIssuerName}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Удаление сертификата","certid": "{0:CertificateID}" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции","certid":"Идентификатор сертификата"}}}}'
## Установка шаблона
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthDeleteCert
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
# 3. Подтверждение входа
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15,3H9A3,3 0 0,0 6,6V10H7V6A2,2 0 0,1 9,4H15A2,2 0 0,1 17,6V19A2,2 0 0,1 15,21H9A2,2 0 0,1 7,19V15H6V19A3,3 0 0,0 9,22H15A3,3 0 0,0 18,19V6A3,3 0 0,0 15,3M3,12H13.25L10,8.75L10.66,8L15.16,12.5L10.66,17L10,16.25L13.25,13H3V12Z" stroke="#148F2B"/></svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите вход пользователя</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Время входа</span><span class="page-info-value">{0:Date:Date::ZGQuTU0ueXl5eSBoaDptbTpzcw==}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Вход пользователя" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции"}}}}'
## Установка шаблона
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthLogin
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
# 4. Доступ к закрытому ключу (расшифрование Cloud CSP)
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.75 8.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M15.75 0a8.25 8.25 0 1 1-2.541 16.101l-1.636 1.636a1.744 1.744 0 0 1-1.237.513H9.25a.25.25 0 0 0-.25.25v1.448a.876.876 0 0 1-.256.619l-.214.213a.75.75 0 0 1-.545.22H5.25a.25.25 0 0 0-.25.25v1A1.75 1.75 0 0 1 3.25 24h-1.5A1.75 1.75 0 0 1 0 22.25v-2.836c0-.464.185-.908.513-1.236l7.386-7.388A8.249 8.249 0 0 1 15.75 0ZM9 8.25a6.733 6.733 0 0 0 .463 2.462.75.75 0 0 1-.168.804l-7.722 7.721a.25.25 0 0 0-.073.177v2.836c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-1c0-.966.784-1.75 1.75-1.75H7.5v-1c0-.966.784-1.75 1.75-1.75h1.086a.25.25 0 0 0 .177-.073l1.971-1.972a.75.75 0 0 1 .804-.168A6.75 6.75 0 1 0 9 8.25Z" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/> </svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите доступ к закрытому ключу</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Имя субъекта</span><span class="page-info-value">{0:CertSubjectName}</span></div><div class="page-info"><span class="page-info-name">Издатель</span><span class="page-info-value">{0:CertIssuerName}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Доступ к ЗК","certid": "{0:CertificateID}" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции","certid":"Идентификатор сертификата"}}}}'
## Установка шаблона
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthPrivateKeyAccess
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
# 5. Отзыв сертификата
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ margin: 8px; 8px; 0px; 0px }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.25 7.25H11.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 4.75H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 10.25H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M19.5 3.25V18.25C19.5 19.4926 18.4926 20.5 17.25 20.5H3.25C2.00736 20.5 1 19.4926 1 18.25V3.25C1 2.00736 2.00736 1 3.25 1H10.25H17.25C18.4926 1 19.5 2.00736 19.5 3.25Z" stroke="#148F2B" stroke-width="1.5"/><path d="M15.5891 13.9308C16.0251 13.4358 16.2877 12.8005 16.2877 12.1088C16.2877 10.5325 14.9251 9.25 13.2503 9.25C11.5755 9.25 10.2128 10.5323 10.2128 12.1088C10.2128 12.8005 10.4753 13.4357 10.9115 13.9308L9.2951 16.7748C9.216 16.9137 9.2428 17.085 9.3609 17.1969C9.4793 17.3087 9.6611 17.3347 9.8092 17.2611L10.9966 16.6707L11.1338 17.928C11.147 18.0489 11.2234 18.1524 11.3332 18.2076C11.3658 18.2241 11.4014 18.2362 11.4392 18.2433C11.6035 18.2736 11.7697 18.1995 11.8488 18.0606L13.2502 15.595L14.6513 18.0606C14.7303 18.1995 14.8965 18.2736 15.0608 18.2433C15.0987 18.2362 15.1344 18.2242 15.167 18.2076C15.2767 18.1524 15.3533 18.0488 15.3664 17.928L15.5038 16.6707L16.6911 17.2611C16.8389 17.3347 17.021 17.3087 17.1392 17.1969C17.2572 17.085 17.2839 16.9137 17.2049 16.7748L15.5891 13.9308ZM13.2505 13.5557C12.4028 13.5557 11.713 12.9067 11.713 12.1088C11.713 11.3109 12.4026 10.6618 13.2505 10.6618C14.0981 10.6618 14.7879 11.3107 14.7879 12.1088C14.7878 12.9066 14.0982 13.5557 13.2505 13.5557Z" fill="#148F2B"/></svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите отзыв сертификата</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Имя субъекта</span><span class="page-info-value">{0:CertFriendlyName}</span></div><div class="page-info"><span class="page-info-name">Причина</span><span class="page-info-value">{0:RevocationReason}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Отзыв сертификата","certid": "{0:CertificateID}" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции","certid":"Идентификатор сертификата"}}}}'
## Установка шаблона
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthRevoke
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
# 6. Подтверждение удаления всех сертификата
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ margin: 8px; 8px; 0px; 0px }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.25 7.25H11.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 4.75H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 10.25H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M19.5 3.25V18.25C19.5 19.4926 18.4926 20.5 17.25 20.5H3.25C2.00736 20.5 1 19.4926 1 18.25V3.25C1 2.00736 2.00736 1 3.25 1H10.25H17.25C18.4926 1 19.5 2.00736 19.5 3.25Z" stroke="#148F2B" stroke-width="1.5"/><path d="M15.5891 13.9308C16.0251 13.4358 16.2877 12.8005 16.2877 12.1088C16.2877 10.5325 14.9251 9.25 13.2503 9.25C11.5755 9.25 10.2128 10.5323 10.2128 12.1088C10.2128 12.8005 10.4753 13.4357 10.9115 13.9308L9.2951 16.7748C9.216 16.9137 9.2428 17.085 9.3609 17.1969C9.4793 17.3087 9.6611 17.3347 9.8092 17.2611L10.9966 16.6707L11.1338 17.928C11.147 18.0489 11.2234 18.1524 11.3332 18.2076C11.3658 18.2241 11.4014 18.2362 11.4392 18.2433C11.6035 18.2736 11.7697 18.1995 11.8488 18.0606L13.2502 15.595L14.6513 18.0606C14.7303 18.1995 14.8965 18.2736 15.0608 18.2433C15.0987 18.2362 15.1344 18.2242 15.167 18.2076C15.2767 18.1524 15.3533 18.0488 15.3664 17.928L15.5038 16.6707L16.6911 17.2611C16.8389 17.3347 17.021 17.3087 17.1392 17.1969C17.2572 17.085 17.2839 16.9137 17.2049 16.7748L15.5891 13.9308ZM13.2505 13.5557C12.4028 13.5557 11.713 12.9067 11.713 12.1088C11.713 11.3109 12.4026 10.6618 13.2505 10.6618C14.0981 10.6618 14.7879 11.3107 14.7879 12.1088C14.7878 12.9066 14.0982 13.5557 13.2505 13.5557Z" fill="#148F2B"/></svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите удаление всех сертификатов</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Удаление всех сертификатов" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции"}}}}'
## Установка шаблона
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthDeleteCerts
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
# 7. Смена ПИН-кода
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ margin: 8px; 8px; 0px; 0px }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.25 7.25H11.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 4.75H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M4.25 10.25H8.25" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/><path d="M19.5 3.25V18.25C19.5 19.4926 18.4926 20.5 17.25 20.5H3.25C2.00736 20.5 1 19.4926 1 18.25V3.25C1 2.00736 2.00736 1 3.25 1H10.25H17.25C18.4926 1 19.5 2.00736 19.5 3.25Z" stroke="#148F2B" stroke-width="1.5"/><path d="M15.5891 13.9308C16.0251 13.4358 16.2877 12.8005 16.2877 12.1088C16.2877 10.5325 14.9251 9.25 13.2503 9.25C11.5755 9.25 10.2128 10.5323 10.2128 12.1088C10.2128 12.8005 10.4753 13.4357 10.9115 13.9308L9.2951 16.7748C9.216 16.9137 9.2428 17.085 9.3609 17.1969C9.4793 17.3087 9.6611 17.3347 9.8092 17.2611L10.9966 16.6707L11.1338 17.928C11.147 18.0489 11.2234 18.1524 11.3332 18.2076C11.3658 18.2241 11.4014 18.2362 11.4392 18.2433C11.6035 18.2736 11.7697 18.1995 11.8488 18.0606L13.2502 15.595L14.6513 18.0606C14.7303 18.1995 14.8965 18.2736 15.0608 18.2433C15.0987 18.2362 15.1344 18.2242 15.167 18.2076C15.2767 18.1524 15.3533 18.0488 15.3664 17.928L15.5038 16.6707L16.6911 17.2611C16.8389 17.3347 17.021 17.3087 17.1392 17.1969C17.2572 17.085 17.2839 16.9137 17.2049 16.7748L15.5891 13.9308ZM13.2505 13.5557C12.4028 13.5557 11.713 12.9067 11.713 12.1088C11.713 11.3109 12.4026 10.6618 13.2505 10.6618C14.0981 10.6618 14.7879 11.3107 14.7879 12.1088C14.7878 12.9066 14.0982 13.5557 13.2505 13.5557Z" fill="#148F2B"/></svg></div><div class="main-header-content"><span class="main-header-title">Подтвердите изменение ПИН-кода</span><span class="main-header-date"/></div></div></div><div class="page-info"><span class="page-info-name">Имя субъекта</span><span class="page-info-value">{0:CertSubjectName}</span></div><div class="page-info"><span class="page-info-name">Издатель</span><span class="page-info-value">{0:CertIssuerName}</span></div><div class="page-info"><span class="page-info-name">Идентификатор сессии</span><span class="page-info-value">{0:SessionId}</span></div></div></div></body></html>'
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","optype": "Смена ПИН-кода","certid": "{0:CertificateID}" }},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя", "optype":"Тип операции","certid":"Идентификатор сертификата"}}}}'
## Установка шаблона
$template = Get-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthChangePin
Set-DssMyDssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -TemplateCaption $descriptionTmpl -TemplateSnippet $snippetTmpl
# 8. Сведения о подписи документа (расширенная информация)
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","certid": "{0:CertificateID}", "sessionid":"{0:SessionId}","optype":"Подпись"}},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя","certid":"Идентификатор сертификата","sessionid":"Идентификатор запроса","optype":"Операция"}}}}'
$template = Get-DssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthSign -Destination MyDssAuth -Recipient User
Set-DssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -Template $descriptionTmpl
# 9. Сведения о расшифровании документа (расширенная информация)
$descriptionTmpl ='{{"values": {{"dss": "КриптоПро DSS","date": "{0:Date}","login": "{0:Login}","certid": "{0:CertificateID}", "sessionid":"{0:SessionId}","optype":"Расшифрование"}},"keys": {{"dss": "Сервер ЭП","date": "Время","login": "Логин пользователя","certid":"Идентификатор сертификата","sessionid":"Идентификатор запроса","optype":"Операция"}}}}'
$template = Get-DssFormatterTemplate -DisplayName $stsDisplayName -EventTypes SecondaryAuthDecrypt -Destination MyDssAuth -Recipient User
Set-DssFormatterTemplate -DisplayName $stsDisplayName -TemplateID $template.ID -Template $descriptionTmpl
# Перезапуск Центра Идентификации для применения настроек
Restart-DssStsInstance -DisplayName $stsDisplayName
# Настройка шаблонов отображаемых данных для операций с документами
# 1. Операции с документами (подпись, расшифрование)
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ /* defaults to dark theme */ body {{ --bg-color: rgb(18,18,18); }} body.light-theme {{ --bg-color: #fff; }} .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; align-self: center; }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 13px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }}</style><title>Document</title></head><body><div class="page"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M26 5H10C8.34372 5 7 6.34372 7 8V28C7 29.6563 8.34372 31 10 31H26C27.6563 31 29 29.6563 29 28V8C29 6.34372 27.6563 5 26 5ZM10 7H26C26.5517 7 27 7.44828 27 8V28C27 28.5517 26.5517 29 26 29H10C9.44828 29 9 28.5517 9 28V8C9 7.44828 9.44828 7 10 7ZM19 23V21H12V23H19ZM24 11V13H12V11H24ZM24 18V16H12V18H24Z" fill="#148F2B"/></svg></div> <div class="main-header-content"><span class="main-header-date">Имя документа</span><span class="main-header-title">{0:Name}</span></div></div></div></body> </html>'
Set-DssDocumentStoreConverterPlugin -DisplayName $dsDisplayName -FileExtension preview_@default_html -Parameters @{ "snippetTemplate" = $snippetTmpl.ToString(); "skipUnknownKeys"="true"; "noDocument"="true"; "ConvertationType"="DocumentInfo" }
# 2. TLS вход по сертификату (Cloud CSP)
$snippetTmpl = '<html lang="en"><head><meta charset="UTF-8" /><style type="text/css">body {{ background-color: transparent; }} body.dark-theme {{ background-color: transparent; }} .main-header-title{{ --title-color: #000; }} .main-header-title.dark-theme{{ --title-color: #fff; }} .page-info-value{{ --title-color: #000; }} .page-info-value.dark-theme{{ --title-color: #fff; }} .main-header-date{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .main-header-date:empty {{ display: none; }} .main-header-date.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name.dark-theme{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} @media (prefers-color-scheme: dark) {{ .main-header-title {{ --title-color: #fff; }} .main-header-title.light-theme {{ --title-color: #000; }} .page-info-value{{ --title-color: #fff; }} .page-info-value.light-theme{{ --title-color: #000; }} .main-header-date{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .main-header-date.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} .page-info-name{{ --subtitle-color: rgba(255, 255, 255, 0.47); }} .page-info-name.light-theme{{ --subtitle-color: rgba(0, 0, 0, 0.55); }} }} *{{ margin: 0; padding: 0; box-sizing: border-box; }} body{{ font-family: sans-serif; margin: 0 auto; align-items: center; justify-content: center; }} .page{{ display: flex; flex-direction: column; }} .main{{ display: flex; flex-direction: column; }} .main-header{{ display: flex; padding: 8px 0px 12px 0; margin-bottom: 10px; /* justify-content: space-between; */ }} .main-header-block{{ display: flex; margin-right: auto; }} .main-header-content{{ display: flex; flex-direction: column; justify-content: center; }} .main-header-icon{{ width: 36px; height: 36px; margin-right: 12px; height: 28px; }} .main-header-icon svg{{ }} .main-header-title{{ font-size: 15px; line-height: 20px; color: var(--title-color); }} .main-header-date{{ font-size: 12px; line-height: 18px; padding: 6px 0 0 0; color: var(--subtitle-color); }} .page-info{{ display: flex; flex-direction: column; padding-top: 14px; line-height: 18px; /* border-bottom: 0.3px dashed #dcd5d5; */ }} .page-info-name{{ font-size: 13px; margin-bottom: 5px; color: var(--subtitle-color); }} .page-info-value{{ font-size: 15px; color: var(--title-color); padding: 2px 0 16px 0; border-bottom: 0.3px dashed #dcd5d5; }}</style><title>Document</title></head><body><div class="page"><div class="main"><div class="main-header"><div class="main-header-block"><div class="main-header-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15,3H9A3,3 0 0,0 6,6V10H7V6A2,2 0 0,1 9,4H15A2,2 0 0,1 17,6V19A2,2 0 0,1 15,21H9A2,2 0 0,1 7,19V15H6V19A3,3 0 0,0 9,22H15A3,3 0 0,0 18,19V6A3,3 0 0,0 15,3M3,12H13.25L10,8.75L10.66,8L15.16,12.5L10.66,17L10,16.25L13.25,13H3V12Z" stroke="#148F2B" stroke-width="1.5" stroke-linecap="round"/></svg></div><div class="main-header-content"><span class="main-header-title">Вход на сайт с сертификатом выданным для</span></div></div></div>{0:TableRow_DnsNames_0}</div></div></body><![CDATA[{ "TableRow_DnsNames": { "0": "<div class=\"page-info\"><span class=\"page-info-value\">{0:TABLES.DnsNames.#i.Name}</span></div>"} }]]></html>'
Set-DssDocumentStoreConverterPlugin -DisplayName $dsDisplayName -FileExtension preview_cloudtls_html -Parameters @{ "snippetTemplate" = $snippetTmpl.ToString(); "skipUnknownKeys"="true"; "noDocument"="true"; "ConvertationType"="CloudTls" }
# Перезапуск Сервиса Обработки Документов для применения настроек
Restart-DssDocumentStoreInstance -DisplayName $dsDisplayName