@@ -0,0 +1,1963 @@
+package com.netflix.priam.resources;%0A%0Aimport com.google.inject.Inject;%0Aimport com.netflix.priam.identity.IMembership;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport javax.ws.rs.*;%0Aimport javax.ws.rs.core.MediaType;%0Aimport javax.ws.rs.core.Response;%0Aimport java.util.Collections;%0A%0A/**%0A * This http endpoint allows direct updates (adding/removing) (CIDR) IP addresses and port%0A * ranges to the security group for this app.%0A */%0A@Path(%22/v1/secgroup%22)%0A@Produces(MediaType.TEXT_PLAIN)%0Apublic class SecurityGroupAdmin%0A%7B%0A    private static final Logger log = LoggerFactory.getLogger(SecurityGroupAdmin.class);%0A    private static final String CIDR_TAG = %22/32%22;%0A    private final IMembership membership;%0A%0A    @Inject%0A    public SecurityGroupAdmin(IMembership membership)%0A    %7B%0A        this.membership = membership;%0A    %7D%0A%0A    @POST%0A    public Response addACL(@QueryParam(%22ip%22) String ipAddr, @QueryParam(%22fromPort%22) int fromPort, @QueryParam(%22toPort%22) int toPort)%0A    %7B%0A        if(!ipAddr.endsWith(CIDR_TAG))%0A            ipAddr += CIDR_TAG;%0A        try%0A        %7B%0A            membership.addACL(Collections.singletonList(ipAddr), fromPort, toPort);%0A        %7D%0A        catch(Exception e)%0A        %7B%0A            log.error(%22Error while trying to add an ACL to a security group%22, e);%0A            return Response.serverError().build();%0A        %7D%0A        return Response.ok().build();%0A    %7D%0A%0A    @DELETE%0A    public Response removeACL(@QueryParam(%22ip%22) String ipAddr, @QueryParam(%22fromPort%22) int fromPort, @QueryParam(%22toPort%22) int toPort)%0A    %7B%0A        if(!ipAddr.endsWith(CIDR_TAG))%0A            ipAddr += CIDR_TAG;%0A        try%0A        %7B%0A            membership.removeACL(Collections.singletonList(ipAddr), fromPort, toPort);%0A        %7D%0A        catch(Exception e)%0A        %7B%0A            log.error(%22Error while trying to remove an ACL to a security group%22, e);%0A            return Response.serverError().build();%0A        %7D%0A        return Response.ok().build();%0A    %7D%0A%7D%0A%0A

Add jersey servlet to manipulate security group values. #223 on the github issues.