added security to picture upload resource

This commit is contained in:
verboomp
2026-01-20 15:28:15 +01:00
parent 8ccd98755b
commit 39580438c2
5 changed files with 157 additions and 6 deletions

View File

@@ -144,6 +144,7 @@
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
<subsystem xmlns="urn:jboss:domain:datasources:7.1">
<datasources>
<!-- Patrick -->
<datasource jndi-name="java:/jdbc/fotoDocumentationDS" pool-name="fotoDocumentationDS" enabled="true" use-java-context="true" use-ccm="false">
<connection-url>jdbc:postgresql://hartmann_postgres:5432/fotodocumentation</connection-url>
<driver>postgres</driver>
@@ -168,6 +169,7 @@
<security user-name="sa" password="sa"/>
</datasource>
<drivers>
<!-- Patrick -->
<driver name="postgres" module="org.postgresql.jdbc">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
@@ -300,7 +302,7 @@
<!-- patrick -->
<jdbc-realm name="fotoDocumentationRealm" >
<principal-query data-source="fotoDocumentationDS" sql="select password, salt, ri.code as Role from x_user u left join role_to_right rtr on rtr.role_id_fk = u.role_id_fk left join x_right ri on rtr.right_id_fk = ri.right_id where username = ?;">
<principal-query data-source="fotoDocumentationDS" sql="select password, salt, ri.code as Role from x_user u left join user_to_right rtr on rtr.user_id_fk = u.user_id left join x_right ri on rtr.right_id_fk = ri.right_id where username = ?;">
<salted-simple-digest-mapper algorithm="password-salt-digest-sha-256" password-index="1" salt-index="2" />
<attribute-mapping>
<attribute to="groups" index="3"/>