1 /* 2 * Copyright [2007] [University Corporation for Advanced Internet Development, Inc.] 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.opensaml.xml.security.credential; 18 19 import java.util.Map; 20 21 import org.opensaml.xml.security.CriteriaSet; 22 23 //TODO amend docs (and impl) for symmetric key storage and retrieval 24 25 26 /** 27 * A {@link CredentialResolver} that pulls credential information from the file system. 28 * 29 * This credential resolver attempts to retrieve credential information from the file system. Specifically it will 30 * attempt to find key, cert, and crl information from files within the given directory. The filename must start with 31 * the entity ID and be followed by one of the follow extensions: 32 * 33 * <ul> 34 * <li>.name - for key names. File must contain a carriage return seperated list of key names</li> 35 * <li>.priv - for private key. File must contain one PEM or DER encoded private key</li> 36 * <li>.pub - for public keys. File must contain one or more PEM or DER encoded private key</li> 37 * <li>.crt - for public certificates. File must contain one or more PEM or DER encoded X.509 certificates</li> 38 * <li>.crl - for certificate revocation lists. File must contain one or more CRLs</li> 39 * </ul> 40 */ 41 public class FilesystemCredentialResolver extends AbstractCriteriaFilteringCredentialResolver { 42 43 /** 44 * Constructor. 45 * 46 * @param credentialDirectory directory credential information can be found in 47 * @param passwords passwords for encrypted private keys, key is the entity ID, value is the password 48 */ 49 public FilesystemCredentialResolver(String credentialDirectory, Map<String, String> passwords) { 50 super(); 51 // TODO 52 } 53 54 /** {@inheritDoc} */ 55 protected Iterable<Credential> resolveFromSource(CriteriaSet criteriaSet) { 56 // TODO Auto-generated method stub 57 return null; 58 } 59 }