shiro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Les Hazlewood" <lhazlew...@apache.org>
Subject Re: JSON as a configuration format?
Date Fri, 29 Aug 2008 20:05:12 GMT
Maybe this is an area where, if it is wanted by end users, they could join
our community and become committers and contribute to the project?  Anyone
writing a configuration implementation would need to know how the JSecurity
components work together (somewhat), and this kind of exercise would be a
good way to become a team member...

On Fri, Aug 29, 2008 at 4:01 PM, Les Hazlewood <les@hazlewood.com> wrote:

> Yep, that's true.  But because we have a Configuration and WebConfiguration
> interface, no one is really constrained per se - anyone can implement any
> format/parser they wish - even XML if someone really wanted that ;)
>
> Although at the moment, we haven't written anything other than .ini
> parsing, so the only constraint is that other options aren't readily
> available in our distribution...
>
>
> On Fri, Aug 29, 2008 at 3:57 PM, Alan D. Cabrera <list@toolazydogs.com>wrote:
>
>> That's an argument for having a simple config system available for novice
>> users and for good documentation, not for constraining the set of ways
>> people can configure.
>>
>>
>> Regards,
>> Alan
>>
>>
>> On Aug 29, 2008, at 12:50 PM, Jeremy Haile wrote:
>>
>>  So that it's simple for users to understand and people don't get confused
>>> on what they're supposed to use to get started.
>>>
>>>
>>> On Aug 29, 2008, at 3:48 PM, Alan D. Cabrera wrote:
>>>
>>>  I like the JSON syntax.
>>>>
>>>> Why does the project need to standardize on a few configuration
>>>> mechanisms?
>>>>
>>>>
>>>> Regards,
>>>> Alan
>>>>
>>>>
>>>> On Aug 29, 2008, at 11:48 AM, Jeremy Haile wrote:
>>>>
>>>>  My fear is that the JSON syntax is bordering on writing our own "Spring
>>>>> framework config" - I'd rather standardize on being able to embed spring
>>>>> than invent our own syntax that no one is familiar with.  I'm not against
>>>>> options, but personally I think most users will be fine either using
the
>>>>> simple INI (properties-looking) format or just using Spring for more
complex
>>>>> situations.
>>>>>
>>>>> J
>>>>>
>>>>>
>>>>> On Aug 29, 2008, at 2:40 PM, Les Hazlewood wrote:
>>>>>
>>>>>  Hi JSecurity Community,
>>>>>>
>>>>>> I'd like to get your thoughts on something.
>>>>>>
>>>>>> Currently, JSecurity's only text-based configuration option (in
>>>>>> web.xml or
>>>>>> jsecurity.ini) is the INI file format.
>>>>>>
>>>>>> This format works well enough and seems clean, but it doesn't
>>>>>> particularly
>>>>>> handle object graph definitions all that well.  But JSecurity
>>>>>> configuration
>>>>>> is essentially just that - an object graph of the JSecurity
>>>>>> SecurityManager
>>>>>> and all of its dependencies (realms, etc).
>>>>>>
>>>>>> JSON might be a better format for object graph definitions, and might
>>>>>> be
>>>>>> more succinct than even INI.  Would it be worth having this as the
>>>>>> preferred
>>>>>> configuration syntax instead?
>>>>>>
>>>>>> Consider the following definitions:
>>>>>>
>>>>>> INI:
>>>>>>
>>>>>> bar = some.domain.package.Bar
>>>>>> bar.name = ABar
>>>>>> bar.amount = 50.00
>>>>>>
>>>>>> foo = some.domain.package.Foo
>>>>>> foo.something = Some value
>>>>>> foo.bar = $bar
>>>>>> foo.anotherThing = 52
>>>>>>
>>>>>> JSON:
>>>>>>
>>>>>> foo: some.domain.package.Foo {
>>>>>> something: Some value,
>>>>>> bar: some.domain.package.Bar {
>>>>>>    name: ABar,
>>>>>>    amount: 50.00
>>>>>> },
>>>>>> anotherThing: 52
>>>>>> }
>>>>>>
>>>>>> What do you think?  Which one would you prefer?
>>>>>>
>>>>>> --
>>>>>> Les
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>

Mime
View raw message