@@ -331,7 +331,7 @@ public Proxy startContainer(Authentication user, Container initialContainer, Con
331331 rContainerBuilder .addRuntimeValue (new RuntimeValue (BackendContainerNameKey .inst , effectiveKubeNamespace + "/" + patchedPod .getMetadata ().getName ()), false );
332332
333333 // create additional manifests -> use the effective (i.e. patched) namespace if no namespace is provided
334- createAdditionalManifests (user , proxySpec , proxy , specExtension , effectiveKubeNamespace );
334+ createAdditionalManifests (user , proxySpec , proxy , specExtension , effectiveKubeNamespace , initialContainer );
335335
336336 // tell the status service we are starting the pod/container
337337 proxyStartupLogBuilder .startingContainer (initialContainer .getIndex ());
@@ -513,12 +513,12 @@ private JsonPatch readPatchFromSpec(String patchAsString) throws JsonProcessingE
513513 *
514514 * The resource will only be created if it does not already exist.
515515 */
516- private void createAdditionalManifests (Authentication auth , ProxySpec proxySpec , Proxy proxy , KubernetesSpecExtension specExtension , String namespace ) throws JsonProcessingException {
516+ private void createAdditionalManifests (Authentication auth , ProxySpec proxySpec , Proxy proxy , KubernetesSpecExtension specExtension , String namespace , Container container ) throws JsonProcessingException {
517517 for (GenericKubernetesResource fullObject : parseAdditionalManifests (proxy , namespace , specExtension .getKubernetesAdditionalManifests (), false )) {
518518 applyAdditionalManifest (proxy , fullObject );
519519 }
520520 for (AuthorizedAdditionalManifests authorizedAdditionalManifests : specExtension .kubernetesAuthorizedAdditionalManifests ) {
521- if (accessControlEvaluationService .checkAccess (auth , proxySpec , authorizedAdditionalManifests .accessControl )) {
521+ if (accessControlEvaluationService .checkAccess (auth , proxySpec , authorizedAdditionalManifests .accessControl , proxy , container )) {
522522 for (GenericKubernetesResource fullObject : parseAdditionalManifests (proxy , namespace , authorizedAdditionalManifests .manifests , false )) {
523523 applyAdditionalManifest (proxy , fullObject );
524524 }
@@ -528,7 +528,7 @@ private void createAdditionalManifests(Authentication auth, ProxySpec proxySpec,
528528 applyAdditionalManifest (proxy , fullObject );
529529 }
530530 for (AuthorizedAdditionalManifests authorizedAdditionalManifests : specExtension .kubernetesAuthorizedAdditionalPersistentManifests ) {
531- if (accessControlEvaluationService .checkAccess (auth , proxySpec , authorizedAdditionalManifests .accessControl )) {
531+ if (accessControlEvaluationService .checkAccess (auth , proxySpec , authorizedAdditionalManifests .accessControl , proxy , container )) {
532532 for (GenericKubernetesResource fullObject : parseAdditionalManifests (proxy , namespace , authorizedAdditionalManifests .manifests , true )) {
533533 applyAdditionalManifest (proxy , fullObject );
534534 }
0 commit comments