예제 #1
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithBlankValue() {
    final String value = BLANK;

    LOGGER.entering(this.getClass().getName(), "testIsNotValidIrideIdentityWithBlankValue", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithBlankValue");
    }
  }
예제 #2
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithMacBlank() {
    final String value = "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2/" + BLANK;

    LOGGER.entering(this.getClass().getName(), "testIsNotValidIrideIdentityWithMacBlank", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithMacBlank");
    }
  }
예제 #3
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsValidIrideIdentity() {
    final String value =
        "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(this.getClass().getName(), "testIsValidIrideIdentity", value);
    try {
      final boolean result = IrideSecurityUtils.isValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsValidIrideIdentity");
    }
  }
예제 #4
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithMissingNomeToken() {
    final String value = "AAAAAA00B77B000F/CSI PIEMONTE";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithMissingNomeToken", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithMissingNomeToken");
    }
  }
예제 #5
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithUnrecognizedValue() {
    final String value = "UNRECOGNIZED_VALUE";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithUnrecognizedValue", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithUnrecognizedValue");
    }
  }
예제 #6
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsValidIrideIdentityWithComplexMacToken() {
    final String value =
        "AAAAAA00A11D000L/CSI PIEMONTE/DEMO 23/IPA/20150223095441/2//VZjBdhZTwU+/7AUMNSHjQ==";

    LOGGER.entering(
        this.getClass().getName(), "testIsValidIrideIdentityWithComplexMacToken", value);
    try {
      final boolean result = IrideSecurityUtils.isValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsValidIrideIdentityWithComplexMacToken");
    }
  }
예제 #7
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithAllEmptyTokens() {
    final String value =
        EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY;

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithAllEmptyTokens", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithAllEmptyTokens");
    }
  }
예제 #8
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithTimestampBlank() {
    final String value =
        "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/" + BLANK + "/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithTimestampBlank", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithTimestampBlank");
    }
  }
예제 #9
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsValidIrideIdentityWithRealisticDigitalIdentity() {
    final String value =
        "NNRLSN69P26L570X/Aldesino/Innerkofler/IPA/20160531113948/2//VZjBdhZTwU+/7AU0A8HjQ==";

    LOGGER.entering(
        this.getClass().getName(), "testIsValidIrideIdentityWithRealisticDigitalIdentity", value);
    try {
      final boolean result = IrideSecurityUtils.isValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(), "testIsValidIrideIdentityWithRealisticDigitalIdentity");
    }
  }
예제 #10
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithCodiceFiscaleBlank() {
    final String value =
        BLANK + "/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithCodiceFiscaleBlank", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(), "testIsNotValidIrideIdentityWithCodiceFiscaleBlank");
    }
  }
예제 #11
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithMissingLivelloAutenticazioneToken() {
    final String value = "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2";

    LOGGER.entering(
        this.getClass().getName(),
        "testIsNotValidIrideIdentityWithMissingLivelloAutenticazioneToken",
        value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(),
          "testIsNotValidIrideIdentityWithMissingLivelloAutenticazioneToken");
    }
  }
예제 #12
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithCodiceFiscaleWithInvalidFormatAndWithNomeEmpty() {
    final String value =
        "AAAAAA00011D000L/" + EMPTY + "/DEMO 20/IPA/20160531113948/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(
        this.getClass().getName(),
        "testIsNotValidIrideIdentityWithCodiceFiscaleWithInvalidFormatAndWithNomeEmpty",
        value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(),
          "testIsNotValidIrideIdentityWithCodiceFiscaleWithInvalidFormatAndWithNomeEmpty");
    }
  }