@Override
  public GenericAcknowledgmentType provision(ProvisionRequestType parameters)
      throws ServiceException {
    validateOAuthScope(NsiScope.PROVISION);
    validateProviderNsa(parameters.getProvision().getProviderNSA());

    Connection connection = getConnectionOrFail(parameters.getProvision().getConnectionId());

    log.info("Received provision request for connection: {}", connection);

    NsiRequestDetails requestDetails =
        new NsiRequestDetails(parameters.getReplyTo(), parameters.getCorrelationId());
    connectionService.provision(connection.getId(), requestDetails);

    return createGenericAcknowledgment(requestDetails.getCorrelationId());
  }
  @Override
  public GenericAcknowledgmentType terminate(TerminateRequestType parameters)
      throws ServiceException {
    log.info(
        "Received a NSI terminate request for connectionId '{}'",
        parameters.getTerminate().getConnectionId());

    validateOAuthScope(NsiScope.TERMINATE);
    validateProviderNsa(parameters.getTerminate().getProviderNSA());

    Connection connection = getConnectionOrFail(parameters.getTerminate().getConnectionId());

    NsiRequestDetails requestDetails =
        new NsiRequestDetails(parameters.getReplyTo(), parameters.getCorrelationId());

    connectionService.asyncTerminate(
        connection.getId(),
        parameters.getTerminate().getRequesterNSA(),
        requestDetails,
        Security.getUserDetails());

    return createGenericAcknowledgment(requestDetails.getCorrelationId());
  }