Skip to content

RSocketInterceptor does not have access to metadataMimeType and dataMimeType #661

Description

@rwinch

Summary

Payload provides the ability to access the metadata and the data, but users cannot read these values without knowing the corresponding mime types. Payload should contain the mime types so users can read the metadata and data values.

Background

I'm working on RSocket & Spring Security support. I’d like to create an RSocketInterceptor to wrap the RSocket with security concerns (authentication / authorization). For this to work security will need to be able to read the Payload. For example, security will need to read the metadata to get credentials for authentication. It will also need to get the metadata to get the route information to perform authorization based logic.

How should I read the Payload metadata from inside an RSocket implementation so security can perform authentication and authorization. The problem I'm having is that while the RSocket API exposes the Payload which contains the metadata, it does not appear to expose the metadataMimeType (or the dataMimeType).

Spring creates a SocketAcceptor (RSocketMessageHandler) which obtains the Mime Types from the ConnectionSetupPayload. It then ensures that the RSocket it creates has a reference to the mime types. I don't think it makes sense for someone implementing RSocketInterceptor to have to also implement and wrap downstream SocketAcceptor to get the mimetypes for metadata and data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions