Comments (3)
Said differently, if a security layer wants to have its own arguments, if
needs to remove those from callargs (or similar) in the encasement library.
We need this to be documented in a clear way and tested.
On Wed, Jul 29, 2015 at 3:03 AM, Yanyan Zhuang [email protected]
wrote:
When we want to specify an arg to a security layer, encasementlib
mistakenly thinks the arg is another security layer.`start dylink.r2py encasementlib.r2py sensor_layer.r2py
restrict_battery.r2py -- -s 10 nanny_battery_test.r2py......
User traceback:
"dylink.r2py", line 547, in
"dylink.r2py", line 408, in dylink_dispatch
"dylink.r2py", line 521, in evaluate
"encasementlib.r2py", line 242, in
"encasementlib.r2py", line 227, in secure_dispatch
"dylink.r2py", line 521, in evaluate
"sensor_layer.r2py", line 250, in
"encasementlib.r2py", line 177, in _secure_dispatch_closure
"encasementlib.r2py", line 227, in secure_dispatch
"dylink.r2py", line 521, in evaluate
"restrict_battery.r2py", line 37, in
"encasementlib.r2py", line 177, in _secure_dispatch_closure
"encasementlib.r2py", line 221, in secure_dispatch
"encasementlib.r2py", line 77, in _layer_code
Exception (with class 'exception_hierarchy.FileNotFoundError'): Cannot
load security layer '-s'. File not found.`Here -s is an arg to security layer restrict_battery.r2py.
—
Reply to this email directly or view it on GitHub
#172.
from seattlelib_v2.
Compare with this security layer that just pop
s from callargs
:
https://github.com/aaaaalbert/benchmark_repy_v2/blob/master/mutarg-seclayer-init.r2py#L6-L7
from seattlelib_v2.
OK, security layers that take a fixed number of arguments can just modify the callargs
list accordingly.
Layers that take a variable number of arguments can perhaps steal the idea described in aaaaalbert/repy_v2@577526e: Use --
to signal a change in the target for the next couple of args.
For the "firewall" layer mentioned in the automatic reference above, I could then use things like
x@y !> start encasementlib.r2py firewall.r2py 10--8 -- user_program.r2py
x@y !> start encasementlib.r2py firewall.r2py 10--8 192.168--16 -- user_program.r2py
x@y !> start encasementlib.r2py firewall.r2py 10--8 192.168--16 -- another_layer.r2py singlearg user_program.r2py user_program_arg
(Another, less beautiful, way to solve this would be to not allow any callargs to security layers, but use config files instead.)
from seattlelib_v2.
Related Issues (20)
- [Unit Test Failure]: ut_seattelib_tcptime.py HOT 3
- [Unit Testing]: Possible Missing Test Condition in `ut_seattlelib_time_interface_updatetime_before_registermethod.r2py` HOT 3
- `repypp.py` should have unit tests HOT 3
- exception when creating geoip location string... HOT 1
- Dylink doesn't allow us to call functions that start with '_' HOT 2
- dnscommon.r2py cannot parse replies containing NS, PTR types of queries HOT 1
- dnscommon.r2py cannot parse replies containing MX type of queries and it doesn't support 'AAAA' records HOT 1
- Fix `httpretrieve`'s use of "Host" header field
- misuse of callargs in argparse.r2py
- wrapper.r2py needs better error messages for function's argument type checking HOT 3
- Refactor library function names? HOT 1
- Port `strace.py` to RepyV2
- Add trigonometric functions to `math.r2py` HOT 1
- Repeating `centralizedadvertise.r2py` and `centralizedadvertise_v2.r2py`. Problem with `advertiseserver_v2.poly.edu` HOT 2
- `dylink` should use introspection instead of hardcoded RepyV2 API call names HOT 1
- Delete obsolete seattlelib_v2.wiki HOT 1
- Separate `dylink` and `encasementlib` cleanly
- Remove `repyportability` from pure-Repy tests
- Bug in wrapper.r2py where argument validity check for 'bool' type fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seattlelib_v2.