Alessio Fabiani (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A0027cfac-890c-48e1-8af0-974f12f7b9dc
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiYjkwNzM0ZTFlMzMwNGMyMWE0ZmYwYWJjMzY0MjkwYTAiLCJwIjoiaiJ9
) / Bug (
https://osgeo-org.atlassian.net/browse/GEOS-9567?atlOrigin=eyJpIjoiYjkwNzM0ZTFlMzMwNGMyMWE0ZmYwYWJjMzY0MjkwYTAiLCJwIjoiaiJ9
) GEOS-9567 (
https://osgeo-org.atlassian.net/browse/GEOS-9567?atlOrigin=eyJpIjoiYjkwNzM0ZTFlMzMwNGMyMWE0ZmYwYWJjMzY0MjkwYTAiLCJwIjoiaiJ9
) [Backup/Restore] Rest Controller not able to backup secured resources (
https://osgeo-org.atlassian.net/browse/GEOS-9567?atlOrigin=eyJpIjoiYjkwNzM0ZTFlMzMwNGMyMWE0ZmYwYWJjMzY0MjkwYTAiLCJwIjoiaiJ9
)
Issue Type: Bug Affects Versions: 2.15.5, 2.16.2, 2.17-RC Assignee: Alessio
Fabiani (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A0027cfac-890c-48e1-8af0-974f12f7b9dc
) Components: Backup and Restore Created: 07/Apr/20 11:28 PM Fix Versions:
2.15.6, 2.16.3, 2.17.0, 2.18-RC Priority: Medium Reporter: Alessio Fabiani (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A0027cfac-890c-48e1-8af0-974f12f7b9dc
)
Trying to perform a backup of a GeoServer catalog having protected resources
through the REST APIs fails with the following exception:
```
2020-04-06 11:07:51,553 DEBUG [backuprestore.listener] - Executions Step
Summaries : {7=StepExecution: id=7, version=2, name=backupResourceInfos,
status=FAILED, exitStatus=FAILED, readCount=0, filterCount=0, writeCount=0
readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0,
rollbackCount=1, exitDescription=org.geoserver.catalog.CatalogException:
java.lang.Exception: Not all the Catalog Resources of class [interface
org.geoserver.catalog.ResourceInfo] have been dumped!
at
org.geoserver.backuprestore.BackupRestoreItem.logValidationExceptions(BackupRestoreItem.java:307)
at
org.geoserver.backuprestore.reader.CatalogItemReader.doRead(CatalogItemReader.java:64)
at org.geoserver.backuprestore.reader.CatalogReader.read(CatalogReader.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy100.read(Unknown Source)
at
org.springframework.batch.core.step.item.SimpleChunkProvider.doRead(SimpleChunkProvider.java:91)
at
org.springframework.batch.core.step.item.SimpleChunkProvider.read(SimpleChunkProvider.java:157)
at
org.springframework.batch.core.step.item.SimpleChunkProvider$1.doInIteration(SimpleChunkProvider.java:116)
at
org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
at
org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
at
org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
at
org.springframework.batch.core.step.item.SimpleChunkProvider.provide(SimpleChunkProvider.java:110)
at
org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:69)
at
org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)
at
org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
at
org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)
at
org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)
at
org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
at
org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
at
org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
at
org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)
at
org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)
at
org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
at
org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)
at
org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)
at
org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)
at
org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)
at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)
at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)
at
org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)
at
org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:275)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.Exception: Not all the Catalog Resources of class
[interface org.geoserver.catalog.ResourceInfo] have been dumped!
at
org.geoserver.backuprestore.reader.CatalogItemReader.doRead(CatalogItemReader.java:58)
... 41 more
```
The issue is caused by the CatalogItemReader trying to dump the ResourceInfos
present in the Catalog.
Authentication is not passed to the Facade() causing the reader to fail to
fetch the protected resources.
(
https://osgeo-org.atlassian.net/browse/GEOS-9567#add-comment?atlOrigin=eyJpIjoiYjkwNzM0ZTFlMzMwNGMyMWE0ZmYwYWJjMzY0MjkwYTAiLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-9567#add-comment?atlOrigin=eyJpIjoiYjkwNzM0ZTFlMzMwNGMyMWE0ZmYwYWJjMzY0MjkwYTAiLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100124-
sha1:c13ca0d )_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel