Reply To: Multi tenancy configuration Spring Security

Splash Forums Rewrite Users Multi tenancy configuration Spring Security Reply To: Multi tenancy configuration Spring Security

#26387

fkoentopp
Participant

Ok, thanks for the answer. My problem is indeed with Spring Security, where the incoming request is forwarded to the internal /pages/login.xhtml. When the request is filtered by the rewrite filter no tenant is available anymore. I want to have something like this:


.addRule(Join.path("/{tenant}/{site}").to("/pages/{site}").withInboundCorrection())
.when(Direction.isInbound())
.where("tenant").constrainedBy(new Constraint<String>() {
	@Override
	public boolean isSatisfiedBy(Rewrite event, EvaluationContext context, String value) {
		return !(value.contains("javax.faces") || value.contains("pages"));
	}
})

.addRule(Join.path("/pages/{site}").to("/{tenant}/{site}"))
.when(Direction.isOutbound())
.where("tenant").configuredBy(new Converter<String>() {
	@Override
	public String convert(Rewrite event, EvaluationContext context, Object value) {
		// Just an example
		return "oracle";
	}
});

How can I put something from outside (e.g. something stored as a session parameter) in the response? With that above I always get a ParameterizationException - "The value of required parameter [tenant] was null."

  • This reply was modified 7 years, 4 months ago by  fkoentopp.
  • This reply was modified 7 years, 4 months ago by  fkoentopp.