Code Monkey home page Code Monkey logo

vault's People

Contributors

flaviovs avatar

Watchers

 avatar  avatar

vault's Issues

Instructions/secret word wrap inconsistency

Instruction and secret textarea input does not specify any word wrapping. Long lines being input in these fields are being displayed using pre-formated output, which causes the text to overflow and break the layout.

Schema Questions

References

I don't think MySQL accepts REFERENCES outside of FOREIGN KEY statements. Can you look into this?

REFERENCES app,

LogLevel

Is this table necessary? Seems like it might be over-normalization.

Ping URL must be mandatory

There's no point in having an app without a ping URL, because the app is responsible to notify engineers upon secret input, and it can only get to know this by being pinged by the Vault.

XSS when displaying instructions to user.

HEs can XSS users by including event attributes in the the instructions markup.

<b onmouseover=alert(1)>Hover over this</b>

This isn't problematic now, but it's unclear what tools in the future may accept user input to pre-generate instructions.

Inconsistent Entity Properties?

Why are some App properties (key, secret, ...) assigned in the constructor and others (ping_url) not?

vault/lib/entity.php

Lines 13 to 18 in 5455673

public function __construct( $key, $secret, $vault_secret, $name ) {
$this->key = $key;
$this->secret = $secret;
$this->vault_secret = $vault_secret;
$this->name = $name;
}

The same question can be asked of several of the other classes. Is there some guiding principal about when to put something in the constructor, when to set properties manually, and when to offer a setter method?

I can't create any secrets

vault/lib/repo.php

Lines 118 to 126 in 5455673

$this->db->perform( 'INSERT into secrets '
. '(reqid, secret, mac, created) '
. 'VALUES (?, ?, ?, ?)',
[
$secret->reqid,
$secret->secret,
$secret->mac,
$secret->created->format( \DateTime::ISO8601 ),
] );
is failing because \DateTime::ISO8601 is not a valid datetime format according to MySQL.

[CRITICAL] www: exception 'PDOException' with message 'SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2016-03-03T07:34:08+00:00'

The +00:00 is what's breaking it for me. Changing the format to 'Y-m-d H:i:s' works for me.

What version of MySQL are you using?

Why rethrow `ConfigException` in `Mailer`?

vault/lib/util.php

Lines 47 to 57 in 5455673

try {
$from_address = $conf->get( 'mailer', 'from_address' );
} catch ( ConfigException $ex ) {
throw new VaultException( 'Missing from_address mailer configuration' );
}
try {
$from_name = $conf->get( 'mailer', 'from_name' );
} catch ( ConfigException $ex ) {
throw new VaultException( 'Missing from_name mailer configuration' );
}

Could the message in ConfigException be expanded, or is it better to rethrow a new VaultException?

Merge client

Now that the system is more mature, it became more and more clear that merging the client app might a be a good idea:

  • Just 1 package, instead of 2
  • More easy to understand the whole system
  • Thus potentially easier to deploy
  • No loss of decoupling -- clients still communicate with the engine through API

Steps:

  • Move app to client/ folder
  • Move client-specific files in lib/
  • Check for common code
  • Update documentation

Cc @mdawaffe

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.