private void validateService(Model model, ServiceShape service, List<ValidationEvent> events) {
        ServiceIndex serviceIndex = ServiceIndex.of(model);
        Set<ShapeId> serviceAuth = serviceIndex.getAuthSchemes(service).keySet();
        TopDownIndex topDownIndex = TopDownIndex.of(model);

        // Validate the service's @auth trait.
        validateShape(serviceAuth, service, service, events);

        // Validate each contained operation's @auth trait.
        for (OperationShape operation : topDownIndex.getContainedOperations(service)) {
            validateShape(serviceAuth, service, operation, events);
        }
    }
All {@code @auth} trait values referenced from an operation must refer
to authentication traits applied to service shapes that enclose the
operation.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/AuthTraitValidator.java