Giter Club home page Giter Club logo

netid's Introduction

NetID

Build Status

Administrative tool for validated identities used in DemocracyOS/app

Install

  1. Fork and/or clone or even just download this repository.
  2. Copy ./app/config/parameters.yml.dist file to ./app/config/parameters.yml.
  3. Set your configuration keys for database driver, host, port, name, user and password on ./app/config/parameters.yml. The parameters.yml file is ignored by git (see .gitignore) so that machine-specific settings like database passwords aren't committed. By creating the parameters.yml.dist file, new developers can quickly clone the project, copy this file to parameters.yml, customize it, and start developing.
  4. On the project root directory, run php app/console doctrine:database:create command to create the database and php app/console doctrine:schema:update --force to create the Net ID database schema.

Note on #3: Either replace parameters variables on ./app/config/parameters.yml or set them as environment variables as shown below.

Settings

Config variables

Symfony will grab any environment variable prefixed with SYMFONY__ and set it as a parameter in the service container. Double underscores are replaced with a period, as a period is not a valid character in an environment variable name. e.g.: a parameter with value %database.driver% should have a config variable named SYMFONY__DATABASE__DRIVER

Production Settings

Heroku buildpack

In order to install this application you must use heroku-buildpack-php. Use the --buildpack parameter when creating a new app:

heroku create --buildpack https://github.com/CHH/heroku-buildpack-php myapp

Or set the BUILDPACK_URL config var on an existing app:

heroku config:set BUILDPACK_URL=https://github.com/CHH/heroku-buildpack-php

Dependencies on ./composer.json will be installed when pushed to heroku server. Procfile runs install.sh file which does the following tasks:

  1. Clears the production cache.
  2. Install bundles' assets.
  3. Dumps compiled assets to /web public folder
  4. Updates doctrine database schema
  5. Craetes the root user if there is no one already. It uses the root_username and root_password parameters
  6. It loads Groups and LegalIdType fixtures
  7. Finally, runs the app

Heroku Settings

First of all enable environment variables through heroku labs:enable user-env-compile In order to install this application you shoud set the following config variables.

MySQL Database

  • SYMFONY__DATABASE__DRIVER: Database driver pdo_mysql for MySQL Server.
  • SYMFONY__DATABASE__HOST: Database host url.
  • SYMFONY__DATABASE__PORT: Database port. Add it as null for default driver port.
  • SYMFONY__DATABASE__NAME: Database name.
  • SYMFONY__DATABASE__USER: Database login user.
  • SYMFONY__DATABASE__PASS: Database login password.

MongoDB

  • SYMFONY__MONGO__DBHOST: mongodb://:@alex.mongohq.com:10057/
  • SYMFONY__MONGO__DBNAME: database name

Admin

  • SYMFONY__ROOT__USERNAME: Root username to access to the admin dashboard.
  • SYMFONY__ROOT__PASSWORD: Root password to access to the admin dashboard. These should be set before deploying the app as they are referenced in the install.sh process to create the root admin.

Active Contributors

License

MIT

netid's People

Contributors

sachalifs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

netid's Issues

[identity validation] - Fix identity search

As identities now have multiple email accounts, the email field is no longer used in the search for identities. It should search in the related emails of an identity, not in their email attribute.

[export] - Generate checksum

When an auditor exports an audition listing (csv, xls) a checksum must be generated, shown in screen and logged.

This is done to prevent the auditor from modifying the file afterwards and claiming it has been modified by us or something.

Log actions for auditing

All actions performed by users on the NetID platform should be logged in an auditable fashion.

In essence, we should log: WHO did WHAT, WHERE and AT WHAT TIME.

For each logged action, we should consider at least the following:

Who

  • IP
  • User agent
  • NetID user

What

  • Performed action (e.g.: authorized, created identity, etc.)
  • Affected identities by action (if any).

Where

  • GeoLoc of user agent, if avalable.
  • Venue associated to user if available (i.e.: office name)

At what time

  • timestamp of performed action.

[readme] - Update readme file

Many features were added but README.md file is still the default Symfony2 text.
Update it to include new configuration and functionalities.

Add wiki pages, too.

New login page with PdR UI

Currently the login page is the FOSUserBundle default login page.

This issue consists in give a PdR style to this page, including the colours and logo.

HTTP endpoints

Provide endpoints for client apps to know if a user is validated to perform a given action (i.e. verb).

Auditor role

Auditors should be able to audit activity on the NetID platform.

Specifically, auditors should be able to:

  • List all activity performed on an identity
  • List all activity performed by a user of NetID.
  • List all activity performed on the platform.
  • Download a csv of any of the previous lists.
Considerations
  • Auditors should not be able to perform any kinds of editing. Unless they are also Operators or a more privileged role.
  • Actions by auditors should be auditable as well (i.e.: logged). Yes: all searches, downloads, etc.

Operator role

Operators should only be able to validate registered, unvalidated identities.

In order to do this an Operator should be able to:

  • 1. Find an identity by legalID name, or email. . If an identity exists for a given, complete entry, it should display. If not, a "no identity for given data" message and prompt the Operator to create a new user for a Citizen. Form should resemble the one described in 2.
  • 2. A form for editing existing values on the ID and adding those required but missing (e.g.: legal address, complete names, etc.) that submits data as validated individual. This should open when clicking on a search result from 1.
  • 3. Mark an identity as "suspicious". This is for cases when another user might have mistyped his legalID and the same number is registered for two different users. An Operator here should validate the proper user and mark the other one as "suspicious".

Considerations for 1.

  • If a given legalID search yields more than one result, consider 3.
  • If an Operator creates a new, validated identity, when search doesn't yield a result, that entity should NOT be email-validated for client apps (i.e.: DemocracyOS) as users should still validate their email even if their identity is validated.

App verbs

For a user to perform an action that requires real ID validation on a client app, NetID has to know a bit about these actions. These actions are what we call verbs.

A client app should be able to have verbs associated to them so they can have validated users for those verbs.

Let's start with a vote and comment verbs for @DemocracyOS .

Users

We need to persist users in order to manage their validation status. For that we'll need a model.

V1, users should support:

  • name: complete first, second, etc. names
  • lastName: complete surnames
  • birthDate: date of birth (use ISO date formatting)
  • legalId: legal ID the user used for registering (e.g.: DNI number in Argentina).
  • discrict: legal distric where the user is registered for voting.
  • apps: collection of tuples with:
    • appId: id of the app the user is registered to
    • foriegnId: id of the user in the third-party app

For instance, the JSON for a user of @DemocracyOS should look like:

{
  name: "Carlos Alberto",
  lastName: "Toma y Araujo",
  birthDate: "1997-07-16",
  legalID: {
    name: "DNI",
    number: "29455231"
  },
  district: "Ciudad Autónoma de Buenos Aires",
  apps: {
    appId: "democracy-os",
    foreignId: "#12f2931ffa91"
  }
}

Dynamic Roles

Roles and actions are now static, defined in the security.yml file.
They should be stored in the database and the admin should be able to assign each action individually to any user.

[auditor] - Log login action

Perform a log each time a user logs into the application.

  • User ID
  • Datetime
  • Current roles at login time
  • IP and fingerprinting info

Add Amazon S3 service

Amazon S3 is required to store de log and possibly in the future upload identity pictures.

i18n

Many words are still only in english.

User emails

When a user is created, how are we going to validate their email and legal id (DNI)?

[log] - Add logging feature

Logs will be stored in a separate MongoDB and will be listed as another Admin in the backend, available to auditor role.

[identity validation] - Validate identities

Operators can access a search view where they enter email, legal id, firstname and/or lastname to search for an specific Identity.

The result will be a list of the matching identities and a button to validate each one of them, though they must be few (e.g.: a result can't be more than 5 identities).

Operator can press the validate button and a warning sign will be shown to make him understand that this action will be logged and prompting wether he's sure to proceed.

On acceptance, Identity will be validated onwards.

Readme v1

Add a minor description and License to Readme.md

add a "World citizenship" login system that is counterfeit proof

Hello,

I looking at creating a voting kiosk at a 24hr Internet cafe and I am looking to integrate a voter card that is based on this
https://github.com/MrChrisJ/World-Citizenship

And also backed by a bitcoin load for its value at time of creation added to zeronet to keep its Decentralized nature while having the transaction impeded in a picture with a key it's meta with a checksum (sha512) to reduce counterfeit votes, voting ID and a valid login card that is equipt with more than enough security also including a password that is needed which could be your fingerprint as identified on the card.

If bitcoin is used to make sure you are successfully logged in (each time you login to vote you take bitcoin out of circulation to add transparency that you were at a voting machine) and it's history avaliable on Your on personal card with a photo in the card of you at sign up so multiple cards are not made and multiple votes are not made that can't be repaired if votes are cast to sway the vote and as it not being for military usage the system would know if you are military and ask at time of setup for a peaceful way of voting while non weaponisation of votes and policy that is not weaponised by military.

Please let me know if anyone is interested as well as keeping compatible with easily setting up another with security cam and fingerprint reader required

Photo of you taken at time of vote for validity and audit / self audit if used by organisation during each session of login for votes and at home browsing would use namecoin and zeronet until ready to go a kiosk that also uses namcoin and zeronet namcoifor decentralization and security with no downtime or the voting system being able to be shutdown with backups and a growing voter network that uses a network they can help at home with maintenance and reduce cost being en

Check on production deployment

The function apache_request_headers() might not work on production environment.

Got to check that, because it is used to get Authorization Bearer on the request headers.

[roles] - Define groups schema

Roles can be grouped into Groups. In other words, a group is a Roles container.

Define groups for:

  1. Super admin user
  2. Admin user
  3. Operator
  4. Auditor

[netid api] - Verify endpoint

Endpoint receives via POST method the email of the identity and responds a 200 status code if the identity is validated or a 403 indicating the error in the json response.

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.