Identity Portal: Fails to load a file from a self-registration module - Error: There seems to be a problem uploading the file. Check uploaded file size or server connectivity and try again.
search cancel

Identity Portal: Fails to load a file from a self-registration module - Error: There seems to be a problem uploading the file. Check uploaded file size or server connectivity and try again.

book

Article ID: 249299

calendar_today

Updated On:

Products

CA Identity Suite

Issue/Introduction

It's configured the SelfRegistration module in the Identity Portal.
Also configured a property in a form for the user to upload a text file or PDF.
However, when trying to upload the Auto Registration task, is getting the error:

"There seems to be a problem uploading the file. Check uploaded file size or server connectivity and try again."

Environment

Release : 14.4.1 

Component : SIGMA-Identity Suite

Cause

server.log (Please see the highlighted lines) in DEBUG mode shows the reason of this error: Access Denied to POST to /rest/protected/formServices/file/upload

2022-08-19 14:50:31,217 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] (default task-195) Secure object: FilterInvocation: URL: /rest/protected/formServices/file/upload; Attributes: [hasRole('ROLE_USER')]
2022-08-19 14:50:31,217 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] (default task-195) Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@905571d8: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@0: RemoteIpAddress: ##.##.###.###; SessionId: e11CzoYJDiW916gB8lXNiaK5FVMWZ_bnRlT6XnMp; Granted Authorities: ROLE_ANONYMOUS
2022-08-19 14:50:31,217 DEBUG [org.springframework.security.access.vote.UnanimousBased] (default task-195) Voter: org.springframework.security.web.access.expression.WebExpressionVoter@385c7cb4, returned: -1
2022-08-19 14:50:31,218 DEBUG [org.springframework.security.web.access.ExceptionTranslationFilter] (default task-195) Access is denied (user is anonymous); redirecting to authentication entry point: org.springframework.security.access.AccessDeniedException: Access is denied

2022-08-19 14:50:31,220 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] (default task-195) Request 'POST /rest/protected/formServices/file/upload' doesn't match 'GET /

Resolution

The file upload URL /rest/protected/formServices/file/upload is protected by design. So can not upload file during self registration of the user.

Because of security reason we can not make this as public. If we do so any body can upload random files with out authenticating with the server.