Fix path match regex
@@ -99,9 +99,9 @@ public class AthenzRoleFilter extends JsonSecurityRequestFilterBase {
Optional<ApplicationName> application = Optional.ofNullable(path.get("application")).map(ApplicationName::from);
final Optional<Zone> zone;
- if(path.matches("/application/v4/tenant/{tenant}/application/{application}/{*}/instance/{*}/environment/{environment}/region/{region}/{*}")) {
+ if(path.matches("/application/v4/tenant/{tenant}/application/{application}/instance/{instance}/environment/{environment}/region/{region}/{*}")) {
zone = Optional.of(new Zone(Environment.from(path.get("environment")), RegionName.from(path.get("region"))));
- } else if(path.matches("/application/v4/tenant/{tenant}/application/{application}/{*}/environment/{environment}/region/{region}/{*}")) {
+ } else if(path.matches("/application/v4/tenant/{tenant}/application/{application}/environment/{environment}/region/{region}/{*}")) {
zone = Optional.of(new Zone(Environment.from(path.get("environment")), RegionName.from(path.get("region"))));
} else {
zone = Optional.empty();
