Forum Discussion
Can I read a remote file contents from an iRule?
If I may add, it depends on a few factors, most importantly the static/dynamic nature of the remote value (does it change often), and the ways in which it can be accessed.
For example, if the value doesn't change often, you could use a management plane process to fetch the value and store it locally in a data group (checking periodically for changes). If you need more real-time (in-line) access to something that changes frequently, then you'd probably need to use something like a sideband call within an iRule. Take note though that this will certainly add some latency. Which brings me to the second factor - how the value is accessed. If it can be fetched via an HTTP call, then a real-time sideband iRule is fairly straight forward. Other protocols and access methods will vary your approach. If you can touch the value with LDAP or RADIUS, then you could use the Access Policy Manager module. Sideband is really tuned for HTTP but can potentially support other protocols. In the shell, you have cURL, Perl, Python, Bash, and a few other ways to grab remote data. You could even, potentially, reach into a remote file system (I believe), but that'd be a management side process and generally not something you could do real-time (unless you exposed that file system through a remote web service, pretty easy to do with something like PHP, in which case you could access it via sideband).
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com