Ivy
  1. Ivy
  2. IVY-1211

Use IvyAuthenticator only when it is really necessary

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently, Ivy uses BasicURLHandler to locate resources and to open an input stream on it. According to the implementation of the release 2.1.0, the constructor of the BasicURLHandler forces the JVM to load the IvyAuthenticator class. This action will have to assume that the "java.net.NetPermission: setDefaultAuthenticator" has already been granted to Ivy, since the IvyAuthenticator will set itself as the JVM's default authenticator.

      However, It will fail in web application when the web container does not grant the NetPermission to ivy. It will causes the whole web application failed because the class BasicURLHandler cannot be initialized.

      Also, sometimes the user only needs to load some resources in its own application's classpath, in which case there is no need to use an authenticator, thus no need to grant Ivy the "java.net.NetPermission: setDefaultAuthenticator". However, currently the user has to grant the permission even if this makes little sense. It will be better if the BasicURLHandler uses IvyAuthenticator only when it is really necessary.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Mark Zheng
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development