Giter Site home page Giter Site logo

elytron-subsystem's People

Contributors

baranowb avatar bstansberry avatar ctomc avatar darranl avatar dmlloyd avatar fjuma avatar ivassile avatar jamezp avatar kabir avatar kwart avatar michpetrov avatar pedroigor avatar pskopek avatar sguilhen avatar treblereel avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elytron-subsystem's Issues

Add KeyStore backed security realm.

Primarily the first KeyStore type we want to verify can be configured in the subsystem is the legacy properties file already in-use.

Secondly we do need to ensure the identity can be fully loaded and group membership information obtained.

Convert to be 100% capabilities and requirements based.

ProviderLoader has capability Provider[]
KeyStore has capability KeyStore requires Provider[]
KeyStoreRealm has capability SecurityRealm required KeyStore
SecurityDomain has capability SecurityDomain requires SecurityRealm

Consider adding runtime attribute to report state of services

Initially thinking about this in the context of the KeyStore service but we are going to have quite a few places where runtime information in the model is directly from a service and also a number of operations invoking services directly.

Runtime information will be missing and operations will fail if their required service is not UP.

Adding the state as a runtime attribute will enable tooling to be more intuitive where a service is not actually available.

Custom provider registration

A couple of uses here: -

  • Firstly the general ability to add a provider not known at all.
    • Secondly the addition of configuration for that provider e.g. a PKCS#11 provider may want a block of config also adding without relying on global config.

Convert domain and realm resources to be security-domain and security-realm

Within the Elytron subsystem we know that these are security related so the 'security' part has been dropped, however elsewhere in the app server and subsystem definitions these should be referenced as 'security-*' to avoid ambiguity - i.e. does a domain attribute have anything to do with our domain mode?

Where the KeyStore is exposed as Runtime model state handle any RuntimeExceptions

12:25:27,149 INFO  [org.jboss.as.controller.management-deprecated] (management-handler-thread - 6) WFLYCTL0028: Attribute password is deprecated, and it might be removed in future version!
12:25:54,917 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 6) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
    ("subsystem" => "elytron"),
    ("keystore" => "pkcs#11"),
    ("alias" => "darranl")
]): java.security.ProviderException: java.lang.UnsupportedOperationException
    at sun.security.pkcs11.P11KeyStore.engineGetCreationDate(P11KeyStore.java:401)
    at java.security.KeyStore.getCreationDate(KeyStore.java:1089)
    at org.wildfly.security.keystore.DelegatingKeyStoreSpi.engineGetCreationDate(DelegatingKeyStoreSpi.java:74)
    at java.security.KeyStore.getCreationDate(KeyStore.java:1089)
    at org.wildfly.security.keystore.DelegatingKeyStoreSpi.engineGetCreationDate(DelegatingKeyStoreSpi.java:74)
    at java.security.KeyStore.getCreationDate(KeyStore.java:1089)
    at org.wildfly.extension.elytron.KeyStoreAliasDefinition$1.performRuntime(KeyStoreAliasDefinition.java:90)

Generally these are not mentioned in the API - however it prevents the runtime op from executing so quietly handle this.

Add SSL Configuration

Within the WildFly project we have a bunch of SSL related tasks to unify configuration, the Elytron subsystem is probably that location.

Speaking with various projects they are happy to work with standard Java types, e.g. SSLContext, KeyManager, TrustManager provided we can make them available - this will become the basis for that.

Need to think in terms of these being capabilities exposed by the subsystem. the subsystem may need closer integration with the realms especially when it comes to things like trust manager integration. Once standardised as capabilities it should be possible for other subsystems to also provide these e.g. maybe the PicketLink subsystem will also provide an alternative way to obtain these.

Ability to enable watching a KeyStore file for modifications.

Deliberately leave this one until the manual management ops are stable, did previously look at this from the perspective of a generic KeyStore in Elytron but IMO this is something that needs much closer integration with the subsystem to relate to the other actions being performed.

We will have some additional things to consider: -

  • Suspend watches if the in-memory version is modified.
  • Maybe some force attributes on the load / save operations if detected out of sync with filesystem.

Make the ServiceUtil classes generic.

They are all essentially following the same pattern.

  • Construct a ServiceName given the simple name.
  • Identify the simple name from an op and use it to construct the ServiceName
  • Handle injection based on a specific type and the simple name to ServiceName conversion.

Allow a default SSLContext to be registered

Generally it will be preferred that subsystems that require SSL related capabilities depend on the actual services installed by Elytron, however there are some cases where libraries will depend on the default SSLSocketFactory and SSLServerSocketFactory instances. For these cases we should have a default SSLContext registered so at least they can take advantage of the capabilities we are providing.

Keep in mind a need for a difference in client and server behaviour as the client behaviour will need to delegate to the client config and not the server config.

Add generic realm definition

Probably one to talk about first but potentially we may want user supplied realms to be definable within our subsystem.

Subsystem developers can always advertise their realm using capabilities and requirements but this may be too much for those that want to be able to supply a custom realm.

A could of points to consider: -

  • Do we need a generic way to define requirements so these can be injected?
  • How will custom realms be configured.

Provider Resource Clean Up

The TODO list!

  • Make sure all unchecked conversions are checked.
  • Ensure mutual exclusivity of model attributes.

Make entire subsystem private

Generally the whole subsystem should be private, other subsystems should be depending on services that return standard types which are either standard Java types or API types defined by Elytron.

In theory the whole subsystem could be replaced by an alternative implementation that provides services that also implement the same APIs.

Also want to ensure external subsystems don't make assumptions about naming conventions used for Elytron services.

For now however until we get true capabilities and requirements support some utility may need to be made available for other subsystems to set the dependencies they need - this could be accomplished by some form of service name factory that would allow external subsystems to ask for a service name for a service that returns a KeyStore named X.

Add 'provider-loader-ref' support to KeyStore definition

i.e. instead of using globally registered providers the Provider[] array from the service will be used instead.

This will also need some form of resolver util although that may live within Elytron.

The util will need to take a Provider[](This means it will be compatible with a service supplied array or a Security.getProviders%28%29 array).

-1 We may have a provider name specified, if specified this MUST match.
-2 We know the service type we are looking for, obviously the provider must be able to provide this.
-3 We know the algorithm so this must match.

I think in general algorithm never gets to be optional.

Runtime attribute and ability to track if KeyStore modified since last save / load

To simplify things to start with the subsystem is actually going to wrap the KeyStore to make it unmodifiable by external subsystems referencing the KeyStore but within the subsystem we should be able to track if it has been modified since the last save / reload.

We also need something to be able to take into account a reverted load as if it had previously been modified the load could clear a flag but a revert could reset the flag.

Add a generic security realm definition

We will add a new interface to the subsystem 'ConfigurableSecurityRealm' which will have an initialize method that takes a Map of Strings, this can be used to provide configuration for custom user realms.

Generally however the preferred approach is that the implementer of a new realm would register it as a capability from their own subsystem then they can have their own strongly defined configuration model.

Long term we may look for more advanced extensibility solutions.

Further work on the Provider resources.

Where the service returns a list of providers we should also be able to include the globally registered providers.

Also one list could possibly reference another list, this way small definitions can be created followed by an aggregation.

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.