Inserting and replacing placeholders in resource code
Uloženo v:
| Název: | Inserting and replacing placeholders in resource code |
|---|---|
| Patent Number: | 12047,469 |
| Datum vydání: | July 23, 2024 |
| Appl. No: | 18/336554 |
| Application Filed: | June 16, 2023 |
| Abstrakt: | Placeholders are inserted and replaced in placeholders in code included in resources. A proxy receives a request for a resource from a client and verifies an authentication credential included therein. The proxy determines a placeholder value indicating the authentication credential is verified and determines the requested resource corresponds to a first modified version of the resource stored in memory accessible to the proxy, the first modified version comprising a code component including a placeholder inserted by the proxy. The proxy replaces the placeholder with a first placeholder value to generate a second modified version of the resource and transmits the second modified version of the resource to a client. In another aspect, a client-side proxy service detects events in a modified version of a web page, inserts a placeholder in code of the web page, replaces the placeholder with a placeholder value, and evaluates the modified code. |
| Inventors: | Microsoft Technology Licensing, LLC (Redmond, WA, US) |
| Assignees: | MICROSOFT TECHNOLOGY LICENSING, LLC (Redmond, WA, US) |
| Claim: | 1. A proxy computing system, comprising: a processor circuit; and first memory storing programming instructions executable by the processor circuit to cause the processor circuit to: insert a first placeholder in a code component of a resource, resulting in a first modified version of the resource, subsequent to the insertion, receive a first request for the resource from a first client computing device, the first request comprising an authentication credential, verify the authentication credential, determine a first placeholder value indicating the authentication credential is verified, determine the requested resource corresponds to the first modified version, replace the first placeholder with the first placeholder value, resulting in a second modified version of the resource, and transmit the second modified version of the resource to the first client computing device. |
| Claim: | 2. The proxy computing system of claim 1 , wherein the programming instructions cause the processor circuit to: receive the resource from a server computing device; identify the code component included in the resource; and subsequent to the insertion, stores the first modified version in second memory accessible to the proxy computing system. |
| Claim: | 3. The proxy computing system of claim 1 , wherein: the code component includes a second placeholder inserted by the proxy computing device; and the programming instructions cause the processor circuit to: determine a second placeholder value based on the received first request, and replace the second placeholder with a second placeholder value, resulting in the second modified version. |
| Claim: | 4. The proxy computing system of claim 3 , wherein the second placeholder comprises: a suffix placeholder specifying a suffix to be inserted into the code component; or a context placeholder specifying a script context to be inserted in the code component. |
| Claim: | 5. The proxy computing system of claim 1 , wherein the programming instructions cause the processor circuit to store the first placeholder value in second memory accessible to the proxy computing system. |
| Claim: | 6. The proxy computing system of claim 1 , wherein the programming instructions cause the processor circuit to: receive a second request for the resource from a second client computing device; determine a second placeholder value based on the received second request; replace the placeholder with the second placeholder value, resulting in a third modified version of the resource; and transmit the third modified version of the resource to the second client computing device. |
| Claim: | 7. The proxy computing system of claim 1 , wherein the programming instructions cause the processor circuit to execute a security proxy. |
| Claim: | 8. The proxy computing system of claim 1 , wherein the code component comprises a static import statement. |
| Claim: | 9. A method performed by a proxy computing device, comprising: inserting a first placeholder in a code component of a resource, resulting in a first modified version of the resource; subsequent to said inserting, receiving a first request for the resource from a first client computing device, the first request comprising an authentication credential; verifying the authentication credential; determining a first placeholder value indicating the authentication credential is verified; determining the requested resource corresponds to the first modified version, replacing the first placeholder with the first placeholder value, resulting in a second modified version of the resource; and transmitting the second modified version of the resource to the first client computing device. |
| Claim: | 10. The method of claim 9 , further comprising: receiving the resource from a server computing device; identifying the code component included in the resource; and subsequent to said inserting, storing the first modified version in memory accessible to the proxy computing device. |
| Claim: | 11. The method of claim 9 , wherein: the code component includes a second placeholder inserted by the proxy computing device; and the method further comprises: determining a second placeholder value based on the received first request, and replacing the second placeholder with a second placeholder value. |
| Claim: | 12. The method of claim 11 , wherein the placeholder comprises: a suffix placeholder specifying a suffix to be inserted into the code component; or a context placeholder specifying a script context to be inserted in the code component. |
| Claim: | 13. The method of claim 9 , further comprising: storing the first placeholder value in memory accessible to the proxy computing device. |
| Claim: | 14. The method of claim 9 , further comprising: receiving a second request for the resource from a second client computing device; determining a second placeholder value based on the received second request; replacing the first placeholder with the second placeholder value, resulting in a third modified version of the resource; and transmitting the third modified version of the resource to the second client computing device. |
| Claim: | 15. The method of claim 9 , wherein the proxy computing device executes a security proxy to perform the method. |
| Claim: | 16. The method of claim 9 , wherein the code component comprises a static import statement. |
| Claim: | 17. A computer-readable storage medium having programming instructions encoded thereon that are executable by a processor circuit of a proxy computing device to perform a method, the method comprising: inserting a first placeholder in a code component of a resource, resulting in a first modified version of the resource; subsequent to said inserting, receiving a first request for the resource from a first client computing device, the first request comprising an authentication credential; verifying the authentication credential; determining a first placeholder value indicating the authentication credential is verified; determining the requested resource corresponds to the first modified version, replacing the placeholder with the first placeholder value, resulting in a second modified version of the resource; and transmitting the second modified version of the resource to the first client computing device. |
| Claim: | 18. The computer-readable storage medium of claim 17 , wherein the method further comprises: receiving the resource from a server computing device; identifying the code component included in the resource; and subsequent to said inserting, storing the first modified version in memory accessible to the proxy computing device. |
| Claim: | 19. The computer-readable storage medium of claim 17 , wherein the method further comprises: receiving a second request for the resource from a second client computing device; determining a second placeholder value based on the received second request; replacing the placeholder with the second placeholder value, resulting in a third modified version of the resource; and transmitting the third modified version of the resource to the second client computing device. |
| Claim: | 20. The computer-readable storage medium of claim 17 , wherein the code component comprises a static import statement. |
| Patent References Cited: | 8752183 June 2014 Aranguren-aznarez et al. 9460222 October 2016 Gutkin et al. 9531715 December 2016 Rodgers 9578123 February 2017 Meyer 11321156 May 2022 Bernatik 11349814 May 2022 Rene 20120137213 May 2012 Hayler 20130097129 April 2013 Shea 20150134956 May 2015 Stachura 20230116631 April 2023 Le Bouthillier 20230205734 June 2023 Zhang |
| Other References: | “How do I serve static files with authentication?”, Retrieved from: https://stackoverflow.com/questions/69877117/how-do-i-serve-static-files-with-authentication, Retrieved Date: Feb. 9, 2023, 4 Pages. cited by applicant “JavaScript ES5 Object Methods”, Retrieved from: https://www.w3schools.com/jS/js_object_es5.asp, Retrieved Date: Feb. 9, 2023, 8 Pages. cited by applicant “JavaScript Object Prototypes”, Retrieved from: https://www.w3schools.com/js/js_object_prototypes.asp, Retrieved Date: Feb. 9, 2023, 10 Pages. cited by applicant “Meta programming”, Retrieved from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Meta_programming, Apr. 5, 2023, 7 Pages. cited by applicant “Minification (programming)”, Retrieved from: https://en.wikipedia.org/wiki/Minification_(programming), Apr. 15, 2023, 4 Pages. cited by applicant “Object.defineProperty( )”, Retrieved from: https://developer.mozilla.org/en-US/docs/web/javascript/reference/global_objects/object/defineproperty, Retrieved Date: Feb. 9, 2023, 13 Pages. cited by applicant “Object.getOwnPropertyDescriptors( )”, Retrieved from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors, Feb. 21, 2023, 3 Pages. cited by applicant “Reverse Proxy—Rule Template”, Retrieved from: https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-rule-template, Apr. 7, 2022, 6 Pages. cited by applicant “Rewriter-pywb”, Retrieved from: https://pywb.readthedocs.io/en/latest/manual/rewriter.html, Retrieved Date: Feb. 9, 2023, 4 Pages. cited by applicant “rewrites”, Retrieved from: https://nextjs.org/docs/pages/api-reference/next-config-js/rewrites, Retrieved Date: Feb. 9, 2023, 13 Pages. cited by applicant “this in JavaScript”, Retrieved from: https://web.archive.org/web/20210506161522/https://www.geeksforgeeks.org/this-in-javascript/, May 6, 2021, 13 Pages. cited by applicant Durieux, et al., “Fully Automated HTML and JavaScript Rewriting for Constructing a Self-healing Web Proxy”, In Journal of Software Testing Verification and Reliability, vol. 30, Issue 2, Mar. 2018, 12 Pages. cited by applicant Heyes, et al., “Locking the Throne Room”, Retrieved from: https://owasp.org/www-pdf-archive/Mario_Heiderich_OWASP_Sweden_Locking_the_throneroom.pdf, Retrieved Date: Feb. 9, 2023, 40 Pages. cited by applicant Klechkovski, Sashe, “saskodh / http-proxy-response-rewrite”, Retrieved from: https://github.com/saskodh/http-proxy-response-rewrite, Oct. 17, 2017, 6 Pages. cited by applicant Ko, et al., “webrecorder / pywb”, Retrieved from: https://github.com/webrecorder/pywb, Feb. 3, 2023, 4 Pages. cited by applicant Kreymer, et al., “Wombat”, Retrieved from: https://github.com/webrecorder/wombat/, Apr. 6, 2023, 4 Pages. cited by applicant Singh, Shubham, “JavaScript Object.getOwnPropertyDescriptor( ) Method”, Retrieved from: https://www.geeksforgeeks.org/javascript-object-getownpropertydescriptor-method/, Retrieved Date: Feb. 9, 2023, 7 Pages. cited by applicant Yakushev, et al., “Reverse Proxy with URL Rewrite v2 and Application Request Routing”, Retrieved from: https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing, Apr. 27, 2022, 17 Pages. cited by applicant |
| Assistant Examiner: | Kassa, Elizabeth |
| Primary Examiner: | Meky, Moustafa M |
| Attorney, Agent or Firm: | Weaver IP L.L.C. |
| Přístupové číslo: | edspgr.12047469 |
| Databáze: | USPTO Patent Grants |
| Abstrakt: | Placeholders are inserted and replaced in placeholders in code included in resources. A proxy receives a request for a resource from a client and verifies an authentication credential included therein. The proxy determines a placeholder value indicating the authentication credential is verified and determines the requested resource corresponds to a first modified version of the resource stored in memory accessible to the proxy, the first modified version comprising a code component including a placeholder inserted by the proxy. The proxy replaces the placeholder with a first placeholder value to generate a second modified version of the resource and transmits the second modified version of the resource to a client. In another aspect, a client-side proxy service detects events in a modified version of a web page, inserts a placeholder in code of the web page, replaces the placeholder with a placeholder value, and evaluates the modified code. |
|---|