Note: Skip this section if you are just creating a project for an
Event handler client.
If you plan to create a project for a Java ReST API client, set the following properties to tell the ReST API client where the Content Services server is running and the endpoints for the ReST APIs:
# HTTP Basic Authentication that will be used by the API content.service.security.basicAuth.username=admin content.service.security.basicAuth.password=admin # Location of the server and API endpoints content.service.url=http://localhost:8080 content.service.path=/alfresco/api/-default-/public/alfresco/versions/1 search.service.path=/alfresco/api/-default-/public/search/versions/1
If you are using OAuth2 with Alfresco Identity Service, then you can use client-credential based authentication:
spring.security.oauth2.client.registration.alfresco-rest-api.provider=alfresco-identity-service
spring.security.oauth2.client.registration.alfresco-rest-api.client-id=clientId
spring.security.oauth2.client.registration.alfresco-rest-api.client-secret=clientSecret
spring.security.oauth2.client.registration.alfresco-rest-api.authorization-grant-type=client_credentials
spring.security.oauth2.client.provider.alfresco-identity-service.token-uri=${keycloak.auth-server-url}/auth/realms/${keycloak.realm}/protocol/openid-connect/token
Or OAuth2 password based authentication:
spring.security.oauth2.client.registration.alfresco-rest-api.provider=alfresco-identity-service
spring.security.oauth2.client.registration.alfresco-rest-api.client-id=clientId
spring.security.oauth2.client.registration.alfresco-rest-api.client-secret=clientSecret
spring.security.oauth2.client.registration.alfresco-rest-api.username=username
spring.security.oauth2.client.registration.alfresco-rest-api.password=pwd
spring.security.oauth2.client.registration.alfresco-rest-api.authorization-grant-type=password
spring.security.oauth2.client.provider.alfresco-identity-service.token-uri=${keycloak.auth-server-url}/auth/realms/${keycloak.realm}/protocol/openid-connect/token
Finally, if you want to provide a custom authentication mechanism, you can enable the delegated external authentication:
content.service.security.delegated=true
Provide a bean that implements the interface DelegatedAuthenticationProvider.