blob: 517cd572511d5208168829544d6ff1b9268c8d6d [file] [log] [blame]
<!--
/***************************************************************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
***************************************************************************************************************************/
-->
Encoded Entries
<p>
Encoded entries allow for sensitive information such as passwords to be obfuscated.
</p>
<p>
Encoded entries are denoted with a <js>'*'</js> character at the end of the key name.
</p>
<p>
For example, the following password is marked for encoding:
</p>
<p class='bpcode w800'>
<cs>[MyHost]</cs>
<ck>url</ck> = <cv>http://localhost:9080/foo</cv>
<ck>user</ck> = <cv>me</cv>
<ck>password*</ck> = <cv>{AwwJVhwUQFZEMg==}</cv>
</p>
<p>
The default encoder is {@link oaj.config.encode.ConfigXorEncoder} which is a simple XOR+Base64 encoder.
</p>
<p>
Custom encoders can be used to provide your own encoding support by implementing the {@link oaj.config.encode.ConfigEncoder} interface.
</p>
<ul class='javatree'>
<li class='jic'>{@link oaj.config.encode.ConfigEncoder}
<ul>
<li class='jm'>{@link oaj.config.encode.ConfigEncoder#encode(String,String) encode(String,String)}
<li class='jm'>{@link oaj.config.encode.ConfigEncoder#decode(String,String) decode(String,String)}
<li class='jm'>{@link oaj.config.encode.ConfigEncoder#isEncoded(String) isEncoded(String)}
</ul>
</ul>
<p>
Encoders are controlled via the following setting:
</p>
<ul class='javatree'>
<li class='jf'>{@link oaj.config.Config#CONFIG_encoder}
</ul>
<p>
Encoded values can be set to plain-text values.
The curly brackets around the value identify whether the value has been encoded or not.
</p>
<p>
Unencoded values are encoded when the file is saved using the {@link oaj.config.Config#commit()} method.
They can also be encoded immediately by calling {@link oaj.config.Config#encodeEntries()}.
</p>