Gaffer icon indicating copy to clipboard operation
Gaffer copied to clipboard

ProxyStore should forward Context to remote store

Open t92549 opened this issue 2 years ago • 1 comments

Describe the new feature you'd like The ProxyStore should forward the user Context on to the remote store so it can be processed by the remote store for auth.

Why do you want this feature? So that the ProxyStore can forward user details for visibility to work properly. A good indication that this ticket is implemented would be if the SingleUseMapProxyStore was changed to use a normal SingleUseMapStore that supports visibility, rather than the SingleUseMapStoreWithoutVisibilitySupport. This would mean the VisibilityITs are ran in the ProxyStoreITs.

Additional context Changes to the ProxyStore createRequest would need to be made to serialise and send the Context: https://github.com/gchq/Gaffer/blob/1f4eaed28f36b0ba4e1deb7923041b4f39c5497f/store-implementation/proxy-store/src/main/java/uk/gov/gchq/gaffer/proxystore/ProxyStore.java#L270-L280

Some change to the rest api would probably need to be made so it can take a Context from the post: https://github.com/gchq/Gaffer/blob/1f4eaed28f36b0ba4e1deb7923041b4f39c5497f/rest-api/spring-rest/src/main/java/uk/gov/gchq/gaffer/rest/controller/OperationController.java#L131-L132

t92549 avatar Feb 06 '23 16:02 t92549

This would also allow a simplification to the Proxy Store to remove existing code which drops the VISIBILITY trait from the remote store's responses when running a GetTraits operation. Proxy Store doesn't support VISIBILITY because it doesn't forward the Context. If it did, these operations could be proxied in the same way as other Operations.

GCHQDeveloper314 avatar Mar 02 '23 09:03 GCHQDeveloper314