Обновление файла конфигурации Windchill
Для включения OAuth в Windchill должны быть отредактированы два файла Windchill, securityContext.properties и Web.xml. Дополнительные сведения см. в разделе Конфигурирование делегированной авторизации OAuth.
1. Обновите следующие свойства в файле securityContext.properties с помощью утилиты site.xconf.
wt.oauth2.token.userNameAttribute
wt.oauth2.token.tokenType
wt.oauth2.token.scopeAttribute
2. Добавьте следующие свойства в файл wt.properties с помощью утилиты site.xconf.
wt.jwt.oauth2.token.issueAtTime
wt.jwt.oauth2.token.azure.tenantId
wt.jwt.oauth2.token.audience
wt.jwt.oauth2.token.tokenIssuer
wt.jwt.oauth2.token.algorithm
wt.jwt.oauth2.token.kidUrl
3. Обновите wt.jwt.oauth2.token.jwtIdpTyp = azure в файле securityContext.properties с помощью securityContext.properties.xconf. Если для этого свойства не предоставлено значение, специфичные для Azure атрибуты в лексеме игнорируются и выполняется стандартная проверка требований JWT.
4. Добавьте расположение файла securityContext.properties в файл WEB-INF/web.xml. Файл WEB-INF/web.xml должен ссылаться на файл securityContext.properties. Файл Web.xml находится в папке /Codebase/WEB-INF/Web.xml. Добавьте расположение в значение параметра для расположения корневого контекста веб-приложения Spring. Следующий пример является действительным, если файл securityContext.properties остается сохраненным в папке по умолчанию. Добавьте путь WEB-INF/security/config/securityContext.xml в <param-value>config/mvc/applicationContext.xml</param-value>. Структура параметра контекста должна иметь вид:
<context-param>
<description>Location of Spring root web application context</description
<param-name>contextConfigLocation</param-name>
<param-value>config/mvc/applicationContext.xml
WEB-INF/security/config/securityContext.xml</param-value>
</context-param>
* 
На расположение файла securityContext.properties также имеется ссылка в securityContext.xml. Если вы изменили расположение папки securityContext.properties, обновите ссылки на новое расположение в Web.xml и securityContext.xml.
5. Добавьте фрагмент кода SpringSecurityFilterChain перед тегом <filter-mapping> в файле Web.xml аналогично следующему:
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/oauth/*</url-pattern>
Добавьте следующий фрагмент кода перед тегом <servlet-mapping> в файле Web.xml.
<servlet>
<description>Bridge Servlet for Oauth Access</description>
<servlet-name>OauthAuthBridgeServlet</servlet-name>
<servlet-class>wt.servlet.AuthBridgeServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>OauthAuthBridgeServlet</servlet-name>
<url-pattern>/oauth/*</url-pattern>
</servlet-mapping>
6. Перезапустите серверы Windchill и Apache. Убедитесь, что Windchill участвует в делегировании авторизации с использованием вашей сети SSO.
* 
Дополнительные сведения см. в разделе Конфигурирование делегированной авторизации OAuth.
Было ли это полезно?