package com.hubspot.baragon.agent.resources;


import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.inject.Inject;
import com.hubspot.baragon.agent.managers.AgentRequestManager;

@Path("/renderedConfigs")
@Produces(MediaType.APPLICATION_JSON)
public class RenderedConfigsResource {
  private static final Logger LOG = LoggerFactory.getLogger(RenderedConfigsResource.class);

  private final AgentRequestManager agentRequestManager;

  @Inject
  public RenderedConfigsResource(
      AgentRequestManager agentRequestManager) {
    this.agentRequestManager = agentRequestManager;
  }

  @GET
  @Path("/{serviceId}")
  public Response getServiceId(@PathParam("serviceId") String serviceId) {
    LOG.info("Received request to view the renderedConfig of serviceId={}", serviceId);
    return agentRequestManager.getRenderedConfigs(serviceId);
  }
}


@@ -371,16 +371,56 @@
 Manager;
+%0Aimport com.hubspot.baragon.auth.NoAuth;
 %0A%0A@Path(
@@ -824,16 +824,26 @@
 %0A  @GET%0A
+  @NoAuth%0A
   @Path(

Make GET to /renderedConfigs/{serviceId} at the Agent level not require authentication