Coder Social home page Coder Social logo

cynara's Introduction

                                              -++-
                                             yyyyyy/
                                          .syyyyyyyys.
                                    .s/`  yyyyyyyyyyyy  `/s.
                                   `yyyo-yyyyyyyyyyyyyy oyyy.
                                   oyyy-syyyyyo++oyyyyys-yyyo
                                 ` syyy oyys/+sddy+/syyo yyys `
                                -hh//yyo s/ohddddddho s oyy//hh-
                                ydddh+/+./hddddddddddh+.+/+hdddh
                           .`  `ddddddh sdddddddddddddds hdddddd.  `.
                           hddy.dddddd/sdddddddddddddddds dddddd.sddd
                           yddd/sddddd.dddddddddddddddddd.dddddy dddh
                           +dddy-ddddd yddddddddddddddddy ddddd yddd+
                           `yddd+oddddy ddddddhhhhdddddd yddddo/dddh`
                            .yddd/oddds-+++++oooooo+++++-sdddo/dddy.
                              --++./s/+dddddddddddddddddd+/s/.++--
                                /ddhy++dddddddddddddddddd+/yhdd+
                                 `+ydd-hddddddddddddddddh-hdy+`
                                    `--` +ossyyyyyysso+ `--`



             -/++++/:`///// `////:-////.  -////-    ://-     :///++//:`      `///.
           -oso:--:ss .+ss:  /ss:``:ssss. `:ss:`   :ssss.    `/ss/-:oss.     /ssso`
          `sso`    --   +ss.-ss-   .ssoss- .ss.   .ss-oso     :ss-  :ss-    -ss-ss+
          -ss+           /ssss.    .ss-/ss/-ss.  `os/ -ss/    :sso+oso:    .ss: :ss:
          `sso            +ss-     .ss- :ssoss.  +ssssssss-   :ss:.+ss.    ossssssss.
           :sso:--:++    `+ss-`   `-ss:` -ssss.`:ss/` `-sss-``/ss:` +ss-`.+ss-` `:sso.
            `:/+o+/:`    +++++-   -++++:  .+++`/++++- .+++++-/++++: `/++:+++++. -+++++.

Cynara

Cynara is fast, simple and safe policy-checker service. Functions of Cynara are:

  • checking access for certain privileges
  • holding policies
  • simple, single function API - for checking policies
  • thin client library - to make access control even more simple
  • ability to use external agent (in case of policies that can't be full processed in cynara and plugins)

API Overview

Please refer to a wiki page on Cynara's API.

Documentation

Documentation is kept on wiki.

Repositories

Cynara repositories are available on:

Contact information

Name E-mail Function
Łukasz Wojciechowski [email protected] Maintainer
Aleksander Zdyb [email protected] Integrator

License

Cynara is licensed under a Apache License Version 2.0, January 2004. Available on Apache website or in LICENSE file.

cynara's People

Contributors

amalinowsk2 avatar azdyb avatar dmichaluk avatar grzelewski avatar jacquesburac avatar jobol avatar kd0228-kim avatar kjackiewicz avatar lukaszwojciechowski avatar m-niesluchow avatar pawiecz avatar penszo avatar pohly avatar rafal-krypa avatar rdkb avatar sehongna avatar tomaszswierczek avatar yl33 avatar zos avatar

Stargazers

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

Watchers

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

cynara's Issues

Drop Tizen-specific stuff from packaging

The packaging directory contains files that are not useful outside of Tizen. Manifest files are Smack-related and the spec file probably wouldn't work outside Tizen.
We should either provide more generic spec or drop it.

Directory packaging_tests has the same problem.

Support distributions without systemd

Systemd isn't standard yet, but Cynara requires it for building and running. This prevents usage on systems like Ubuntu, where systemd isn't available.

We should make it an optional build requirement and provide a legacy System V init script.

CMake doesn't work when called without arguments

CMake configuration relies on arguments passed from outside: LIB_INSTALL_DIR, INCLUDE_INSTALL_DIR and VERSION. Cmake should work in stand-alone mode, called by hand, not by rpmbuild.
Also it's not very good for a project to not know it's own version.

Include proper README and INSTALL files

README should describe what Cynara is for and how it works (at least briefly). INSTALL should provide instructions for building and installing the project.

cynara-test depends on random initialization of global instances

When cross-compiled with gcc 4.9 using the meta-framework-security bitbake recipes [1], cynara-test immediately segfaults before even reaching main(). I suspect that PolicyKeyFeature::m_wildcardValue (a global instance) when k_nun (another global) gets created (_M_p = 0x0 in m_wildcardValue).

Program received signal SIGSEGV, Segmentation fault.
0x080c0f94 in operator== (__rhs=..., __lhs=...)
at /work/build/iot/x86/tmp-glibc/sysroots/qemux86/usr/include/c++/4.9.2/bits/basic_string.h:2516
2516 /work/build/iot/x86/tmp-glibc/sysroots/qemux86/usr/include/c++/4.9.2/bits/basic_string.h: No such file or directory.
(gdb) where
#0 0x080c0f94 in operator== (__rhs=..., __lhs=...)

at /work/build/iot/x86/tmp-glibc/sysroots/qemux86/usr/include/c++/4.9.2/bits/basic_string.h:2516

#1 Cynara::PolicyKeyFeature::PolicyKeyFeature (this=0xbffffcb8, value=...)

at /usr/src/debug/cynara/0.8.0+gitAUTOINC+b4cb3d8e86-r0/git/src/common/types/PolicyKey.h:89

#2 0x08070a55 in create (value=...)

at /usr/src/debug/cynara/0.8.0+gitAUTOINC+b4cb3d8e86-r0/git/src/common/types/PolicyKey.h:48

#3 __static_initialization_and_destruction_0 (__priority=65535,

__initialize_p=1)
at /usr/src/debug/cynara/0.8.0+gitAUTOINC+b4cb3d8e86-r0/git/test/common/protocols/TestDataCollection.h:40

#4 0x081e2ae4 in __do_global_ctors_aux ()
#5 0x0805ebc0 in _init ()
#6 0x494d8b0c in ?? () from /usr/lib/libstdc++.so.6

Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) up
#1 Cynara::PolicyKeyFeature::PolicyKeyFeature (this=0xbffffcb8, value=...)

at /usr/src/debug/cynara/0.8.0+gitAUTOINC+b4cb3d8e86-r0/git/src/common/types/PolicyKey.h:89

89 m_isWildcard(value == PolicyKeyFeature::m_wildcardValue),
(gdb) p value
$1 = (const Cynara::PolicyKeyFeature::ValueType &) @0xbffffca4: {
static npos = ,
_M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0x827ee8c ""}}
(gdb) up
#2 0x08070a55 in create (value=...)

at /usr/src/debug/cynara/0.8.0+gitAUTOINC+b4cb3d8e86-r0/git/src/common/types/PolicyKey.h:48

48 return PolicyKeyFeature(value);
(gdb) up
#3 __static_initialization_and_destruction_0 (__priority=65535,

__initialize_p=1)
at /usr/src/debug/cynara/0.8.0+gitAUTOINC+b4cb3d8e86-r0/git/test/common/protocols/TestDataCollection.h:40

40 static const Cynara::PolicyKey k_nun(PKF::create(""), PKF::create("u"), PKF::create(""));
(gdb) p PolicyKeyFeature::m_wildcardValue
$1 = {static npos = ,
_M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0x0}}

[1] https://github.com/01org/meta-intel-iot-security (recipe with cynara-test enabled to be published there soon)

Compilation fais with clang++

Clang++ (tried version 3.5) finds and interesting problem with the code. Originally it's a warning, but it's treated as error due to -Werror:

Scanning dependencies of target cynara-commons
[  3%] Building CXX object src/common/CMakeFiles/cynara-commons.dir/protocol/ProtocolClient.cpp.o
In file included from /data/rafal/src/cynara/src/common/protocol/ProtocolClient.cpp:36:
/data/rafal/src/cynara/src/common/protocol/ProtocolClient.h:44:18: error: 'Cynara::ProtocolClient::execute' hides overloaded virtual function
      [-Werror,-Woverloaded-virtual]
    virtual void execute(RequestContextPtr context, CheckRequestPtr request);
                 ^
/data/rafal/src/cynara/src/common/response/ResponseTaker.h:36:18: note: hidden overloaded virtual function 'Cynara::ResponseTaker::execute'
      declared here: type mismatch at 2nd parameter ('shared_ptr<class Cynara::CheckResponse>' vs 'shared_ptr<class Cynara::CheckRequest>')
    virtual void execute(RequestContextPtr context, CheckResponsePtr response);
                 ^
1 error generated.
make[2]: *** [src/common/CMakeFiles/cynara-commons.dir/protocol/ProtocolClient.cpp.o] Error 1
make[1]: *** [src/common/CMakeFiles/cynara-commons.dir/all] Error 2
make: *** [all] Error 2

cynara-tests should not depend on en_US.UTF8

With the following change I get parser.getKeyAndValue to pass also on a system which has no
en_US.UTF8 locale:
sed -i -e 's/std::locale("en_US.UTF8")/std::locale("C")/g' ${S}/test/credsCommons/parser/Parser.cpp

As far as I can see at a glance, the test does not really depend on the en_US.UTF-8 locale (strings all plain ASCII?!), so this shouldn't change anything.

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.