Giter Club home page Giter Club logo

akamai's People

Contributors

alexpott avatar cam8001 avatar naveenvalecha avatar neetumorwani avatar nerdstein avatar scrutinizer-auto-fixer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

akamai's Issues

Keep track of purging status when calling invalidate()

Purging is handled via a Purge Purger plugin, which implements PurgerInterface.

If you look here, you can see what sort of response Purge expects in order to keep track of Purge status:

https://github.com/nielsvm/purge/blob/8.x-3.x/src/Plugin/Purge/Purger/PurgerInterface.php#L66

Akamai keeps track of Purge status in its queues. We would need to track some state to keep a log of when things are actually invalidated/purged upstream vs when the API request was made.

Stub out module scaffolding

Set up 8.x-2.x version
-info file
-set up travis.yml
-known dependencies: expire (or some cache-level expiration tool like purge)

Research task: evaluate cache invalidation strategy

Current D7 behaviors are...

  1. If "Expire" is enabled (soft dependency) to register Akamai with Expire and perform cache invalidations inline with Expire's operations
  2. If Expire is not enabled, taps into Drupal's hook node update and hook node delete functionality to perform cache invalidation

The purpose of this ticket is to outline the appropriate cache invalidation strategy such that Akamai appropriately invalidates all pages when changes occur

Add Akamai Cache Clearing custom block type

  1. Can place block on any page (not just nodes but can be a View page or Panelizer page, etc)
  2. Only shows / displays for users with "cache clear" permission
  3. Renders a button that clears the page's URL

Security concerns

Hello,

I've got serious concerns about the security of this module. If someone puts their credentials in the UI, they're sending them in the clear, and if a large company did this, they would be exposing the company, and Akamai, to serious issues. Additionally, anyone who can see the database (are the credentials stored in the clear like Wordpress?) can access the credentials.

It would be much better to instruct people to send the credentials to the system via sftp. It may be more of an issue, but it would be better than what's being done now. It's critically important that these credentials be protected, and without HTTPS and database protection, the users should access this file as an sftp target.

Our security folks will likely have serious issues with this as well.

Kirsten Hunter
API Evangelist, Akamai

Implement credentials check for purge plugin

This is needed to properly integrate the upstream client. We obviously need to make sure Akamai's credentials work if we want to connect to their API. I have recently been given dev access to an Acquia partner account to test this.

Replace custom log controller with views

It would be much more flexible and maintainable if instead of using custom code to interact with the status log, we could instead expose its data to views.

  • describe PurgeStatus to views
  • Package default views with the module for listing and detail views of purge status entries

Ensure that purge requests are sending valid, fully formed URLs

CCUv2 requires that URL purges specify fully qualified URLs.

Before queueing a purge request, we should ensure that:

We should feedback to the user and prevent a form submit on the manual cache clear forms. Bad URLs shouldn't need to be manually checked when Purge is clearing handling.

Handle timeout exceptions gracefully

Recommendation - Creating a DiagnosticCheck plugin to prevent your purger from even being called when it sets an ERROR.
Error - Uncaught PHP Exception GuzzleHttp\Exception\ConnectException: "cURL error 28: Operation timed out after 5590 milliseconds with 0 out of -1 bytes received

Configure Akamai settings

Settings form for what is currently in the D7 version's configuration form

Sample settings:
-Akamai API URL
-Cache clearing user / password
-Base path
-Timeout length
-Akamai domain (production, staging)
-Clearing action type default (remove or invalidate option)

Please leverage CMI such that configuration options can be exported by site

Only check valid credentials on change

Diagnostics checks can run more than is necessary; for example, CredentialsCheck is running on almost every page load on my dev machine. Change the logic so the credentials are only checked when they change.

Permissions

  • administering Akamai settings
  • running manual cache clears
  • locks down the forms

Decouple logging and debugging from AkamaiClient

I think we need to make AkamaiClient more decoupled, so it is easier to test and extend, and is more maintainable.

  • It would be great to be able to enable or disable PurgeStatus logging. At present theres a hard dependency between StatusStorage and AkamaiClient
  • I would love to be able to add Guzzle Middleware so that you could see the actual requests being sent. That would be great for support and debugging on live sites, and would allow us to write very comprehensive tests that ensure that requests are valid.

Update config to respect the CCUv2 config keys

The config form/object at present is inherited from D7 and tracks a whole lot of config that doesn't seem to show up in the EdgeGrid Client examples, so we need to update it to respect those.

Config keys should look something like: https://github.com/akamai-open/AkamaiOPEN-edgegrid-php/blob/master/tests/edgerc/.edgerc

[default]
client_secret = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
host = xxxxx.luna.akamaiapis.net/
access_token = xxxxx
client_token = xxxxx

We should keep reference to the mock endpoint URI.

Manual cache clearing form

A Drupal form that allows a site admin to manually specify...

  1. List of URLs to clear
  2. Akamai domain (prod, stg)
  3. Clearing action type (invalidate, remove)

Set up a service to manage Akamai

-Set up Drupal service

-Create a protected function for connecting to Akamai that can be invoked from the other functions of the service
--Pulls from the configuration settings by default
--Can be overridden by function parameters

-Create a public function to clear cache
--Calls the connection function
--Pass parameter of a specific page
--Pull from default settings or from the manually specified values in the manual cache clear form
--Returns response from Akamai, logs response in Watchdog

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.