GithubHelp home page GithubHelp logo

cs-vault-server's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cs-vault-server's Issues

Remove name duplication from application config

You defined the scope: Zookeeper, but inside the scope you use zooKeeperRootNode, why not to use just rootNode. Change everywhere to be logically motivited. Environment variables should be built like <SCOPE>_<VAR>_<NAME>, e.g. ZOOKEEPER_ROOT_NODE.

Change everywhere!

Add configuration parameter for tag prefix

Right now it uses: vault.ro, vault.rw, but we should be able to configure prefix, like [csext.]vault.ro to reflect external requirements. It should be configured in an config variable like:

TAGNAME_PREFIX=csext

"." (dot) symbol should be appended automatically if trailing dot is missing. By default TAGNAME_PREFIX is just empty.

Don't omit "domain" parameter when working with cloudstack

Accounts and VMs reside in domains, when you request something domain must be specified because without the domain you implicitly work in root domain (ask Elena Ershova if required about domains).

Affected:
https://github.com/bwsw/cs-vault-server/blob/develop/src/main/scala/com/bwsw/cloudstack/vault/server/cloudstack/CloudStackService.scala#L117

Two accounts with the same names might exist in different domains, e.g. root domain and room-1 domain.

Place keyspace to tags too

Add vault.path to place also a keyspace (host, prefix) which is affected by ro/rw keys both to user and vm. See #29 first as it's affected too.

Implement unit tests

a) Implement negative tests for services
b) Implement negative and positive tests for taskCreators of services

Get rid of keeping account tags in each user because CloudStack v4.10.3-NP allows creating tags for an account

  1. Exclude processing of UserCreate and UserDelete events from EventHandler
  2. CloudStackTaskCreator won't be changed
  3. CloudStackService — all methods using User should be replaced by "getAccountTags" method
  4. CloudStackVaultController — remove "handleUserCreate" method. "handleAccountCreate" method should be implemented as handleVmCreate excluding a part that retrieves "accountId" by "vmId"
  5. Remove UserResponse

Application Config: Zookeeper url param

If the param allows adding more than one server, then the name should be list. Basically, I beliave all where we use list, we should use endpoints, if use one - endpoint

So

Zookeeper {
  endpoints = "zk://127.0.0.1:2181/"
  endpoints = ${ZOOKEEPER_ENDPOINTS}
}

looks fine. Change everywhere. Change environment variables.

ConsumerManager constructor redesign

What is the purpose to accept by

class ConsumerManager(topic: String, brokers: String, components: Components)

topic, brokers, components parameters. I don't see the purpose. You are mixing levels of abstraction. Fix it.

StrictLogging trait usage

Sometimes "StrictLogging" trait is used, sometimes just

  private val logger = LoggerFactory.getLogger(this.getClass)

Is it for a reason? Unify. Don't do the mess.

Prepare project for further implementation

  1. Create Scala application
  2. Create application.conf with needed settings
  3. Create singleton object for reading settings from application.conf when others objects will apply to get settings

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.