Giter Club home page Giter Club logo

cdp's People

Watchers

 avatar  avatar  avatar  avatar

cdp's Issues

CredInjectionServlet configuration

To make this servlet usable by webapps out-of-the-box the configuration needs to be moved from web.xml to an external configuration file. This is currently needed by the vos.git/cavern project.

TERENA certificate support to be fixed

Trying to delegate a terena user certificate with this command:
java ca.nrc.cadc.cred.client.Main -d --delegate --daysValid=20 --cert=<terena_key_and_crt.pem>
It is thrown a ResourceNotFoundException
The reason is that the CSR is saved in the database (CertificateDAO.java, put method) with an hash key different to which used to retrieve it (DelegationsImpl.java, hash method).

Details:

CertificateDAO.java, put method, calculates the x509 certificate chain hash :
X509CertificateChain.getHashKey()

DelegationsImpl.java, in initializeIdentity method calls Delegations.hash, which calculates the principal hash:

public String hash(X500Principal principal)
{
return Integer.toString(principal.hashCode());
}

Patch is to change this last method:

public String hash(X500Principal principal)
{
    return X509CertificateChain.getHashKey(principal);
}

getProxyCert fails

CredClient.getProxyCertificate fails with when the currently delegated certificate is not valid (eg expired). This leaves the calling service unable to diagnose and report a suitable error to it's caller.

impovement:

  • need a standard error message from service in this case and suitable http status code
  • CredClient needs to handle this and throw a better exception than HttpDownload (IOException)

SERVICE_ID = "ivo://oats.inaf.it/cred" should be configurable

In file
cdp/cadc-cdp/src/main/java/ca/nrc/cadc/cred/client/Main.java
SERVICE_ID = "ivo://oats.inaf.it/cred" should be configurable

Proposed patch: to add a constructor to initialize the string and add the string initialiaztion to the main method also:

//public static final String SERVICE_ID = "ivo://oats.inaf.it/cred";
public static String SERVICE_ID;

public Main() {
    LocalAuthority localAuthority = new LocalAuthority();       
    URI serviceURI = localAuthority.getServiceURI(Standards.CRED_DELEGATE_10.toString());
    SERVICE_ID = serviceURI.toString();


}

/**
 * Main class for accessing CDP
 * 
 * @param args
 */
public static void main(String[] args)
{
    LocalAuthority localAuthority = new LocalAuthority();       
    URI serviceURI = localAuthority.getServiceURI(Standards.CRED_DELEGATE_10.toString());
    SERVICE_ID = serviceURI.toString();

In file
cdp/cadc-cert-gen/src/main/java/ca/nrc/cadc/cert/AbstractCertGenAction.java
The string CRED_SERVICE_ID should be configurable.
Proposed patch:
add a constructor where initialize the string. Not clear to me if the initialization should be added in init() method also.

//public static final URI CRED_SERVICE_ID = URI.create("ivo://cadc.nrc.ca/cred");
public static URI CRED_SERVICE_ID;

protected int expiring;
protected String userid;

public AbstractCertGenAction() {

    LocalAuthority localAuthority = new LocalAuthority();       
    CRED_SERVICE_ID = localAuthority.getServiceURI(Standards.CRED_DELEGATE_10.toString());

}


public boolean init(final ArgumentMap argMap) throws IOException
{
    LocalAuthority localAuthority = new LocalAuthority();       
    CRED_SERVICE_ID = localAuthority.getServiceURI(Standards.CRED_DELEGATE_10.toString());

Get privileged cert from alternate file location

It would be useful if one could specify an alternate location in which CredUtil.java would look for the privileged client certificate. Currently, it either in JNDI or in $HOME/.ssl/cadcproxy.pem.

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.