Skip to content

Commit

Permalink
srr: limit publisched endpoints to GLOBAL scope
Browse files Browse the repository at this point in the history
Motivation:
When SRR publishes a door, then it expected that the door is accessible
by others. Thus we should publish only globally accessible interfaces.

Modification:
Update SrrBuilder to filter doors with GLOBAL scope.

Result:
The link-local and local host interfaces are not published.

Ticket: #10249
Acked-by: Paul Millar
Target: master, 7.2, 7.1, 7.0, 6.2
Require-book: no
Require-notes: yes
(cherry picked from commit 9c85dab)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
  • Loading branch information
kofemann authored and mksahakyan committed Dec 8, 2021
1 parent 0c77844 commit 7d55df2
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -20,6 +20,7 @@
import java.util.stream.Collectors;
import org.dcache.cells.CellStub;
import org.dcache.poolmanager.PoolMonitor;
import org.dcache.util.NetworkUtils.InetAddressScope;
import org.dcache.util.Version;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -237,6 +238,7 @@ private List<Storageendpoint> collectEndpoint() {

return loginBrokerSubscriber.doors().stream()
.filter(doorTagFilter)
.filter(i -> i.supports(InetAddressScope.GLOBAL))
.map(d -> {
Storageendpoint endpoint = new Storageendpoint()
.withName(id + "#" + d.getProtocolFamily() + "@" + d.getAddresses().get(0)
Expand Down

0 comments on commit 7d55df2

Please sign in to comment.