JEP 184: HTTP URL PermissionsJEP 184: HTTP URL PermissionsOwnerMichael McMahonTypeFeatureScopeSEStatusClosed / DeliveredRelease8Componentcore-libs / java.netDiscussionnet dash dev at openjdk dot java dot netEffortSDurationSDependsJEP 140: Limited doPrivilegedReviewed byAlan Bateman, Chris Hegarty, Jeffrey NisewangerEndorsed byBrian GoetzCreated2013/03/26 20:00Updated2017/06/14 18:38Issue8046174Summary
Define a new type of network permission which grants access in terms of
URLs rather than low-level IP addresses.
Motivation
The only way to specify network permissions today is with the
java.net.SocketPermission class, which has two major drawbacks:


Socket permissions govern the initiation of low-level TCP
connections.  They therefore cannot distinguish between an HTTP
connection to some host, which might be permitted, and other kinds
of TCP connections to the same host, which might not be permitted.


Socket permissions operate in terms of IP addresses rather than host
names.  This makes it impossible to distinguish between virtual HTTP
servers hosted on the same physical server at the same IP address.
Even though two such servers have different domain names, a
SocketPermission instance cannot be used to permit access to one
server but not the other.


Description
This feature will define a higher-level permission type specific to HTTP
or perhaps, more generally, to arbitrary URL schemes.  The class will be
able to express permissions in terms of HTTP request methods (GET,
POST, PUT, etc.) and URL scheme, authority, and path components.
No DNS lookups will be required in order to do permission checks or to
compare permission objects for equality.
The HTTP protocol handler will check for these new permissions in the
call stack and, using the limited doPrivileged() feature, it
will effectively convert the URL permission into a SocketPermission for
the actual destination.
Testing
This feature introduces one new class, which can be tested using the
JDK's built-in HTTP server.  Unit tests for the class itself, i.e., for
testing public methods such as implies(), can be written directly.  The
engineering work for this feature will include both kinds of tests.
Dependences
This feature depends on JEP 140: Limited doPrivileged.
Impact

Security: Introduces a new security permission.  The use of limited
doPrivileged() should limit the risk of security issues.

InstallingContributingSponsoringDevelopers' GuideVulnerabilitiesJDK GA/EA BuildsMailing listsWiki
                      · IRCBylaws · CensusLegalWorkshopJEP ProcessSource codeMercurialGitHubToolsGitjtreg harnessGroups(overview)AdoptionBuildClient LibrariesCompatibility & Specification ReviewCompilerConformanceCore LibrariesGoverning BoardHotSpotIDE Tooling & SupportInternationalizationJMXMembersNetworkingPortersQualitySecurityServiceabilityVulnerabilityWebProjects(overview,
      archive)AmberBabylonCRaCCaciocavalloClosuresCode ToolsCoinCommon VM InterfaceCompiler GrammarDetroitDevelopers' GuideDevice I/ODukeGalahadGraalIcedTeaJDK 7JDK 8JDK 8 UpdatesJDK 9JDK
      (…,
       21,
       22,
       23)JDK UpdatesJavaDoc.NextJigsawKonaKullaLambdaLanaiLeydenLilliputLocale EnhancementLoomMemory Model UpdateMetropolisMission ControlMulti-Language VMNashornNew I/OOpenJFXPanamaPenrosePort: AArch32Port: AArch64Port: BSDPort: HaikuPort: Mac OS XPort: MIPSPort: MobilePort: PowerPC/AIXPort: RISC-VPort: s390xPortolaSCTPShenandoahSkaraSumatraTiered AttributionTsanType AnnotationsValhallaVeronaVisualVMWakefieldZeroZGC

        © 2024 Oracle Corporation and/or its affiliates
        Terms of Use
        ·
        
            License: GPLv2
        · Privacy
        · Trademarks
