8177324: Some javax/security/ tests don't have correct module dependencies
Reviewed-by: weijun
This commit is contained in:
parent
380a9bb2db
commit
6716b5f631
jdk/test/javax/security
auth
PrivateCredentialPermission
Subject
SubjectDomainCombiner
kerberos
login
sasl/Sasl
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,6 +33,7 @@ import org.testng.annotations.Test;
|
||||
/*
|
||||
* @test
|
||||
* @bug 8050409
|
||||
* @modules jdk.security.auth
|
||||
* @summary Tests with Subject.getPrivateCredentials to check permission checks with one or more principals.
|
||||
* @run testng/othervm/policy=MoreThenOnePrincipals.policy MoreThenOnePrincipals
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,11 +25,15 @@
|
||||
* @test
|
||||
* @author Ram Marti
|
||||
* @bug 4326852
|
||||
* @modules jdk.security.auth
|
||||
* @summary Retrive a subset of private credentials can be accessed
|
||||
* @run main/othervm/policy=Subset.policy Subset
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import com.sun.security.auth.SolarisPrincipal;
|
||||
import javax.security.auth.Subject;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,14 +24,19 @@
|
||||
/*
|
||||
* @test
|
||||
* @bug 4364826
|
||||
* @modules jdk.security.auth
|
||||
* @summary Subject serialized principal set is
|
||||
* implementation-dependent class
|
||||
* @run main/othervm/policy=Serial.policy Serial
|
||||
*/
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import javax.security.auth.Subject;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
public class Serial implements java.io.Serializable {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,18 +24,20 @@
|
||||
/*
|
||||
* @test
|
||||
* @bug 4390546
|
||||
* @modules jdk.security.auth
|
||||
* @summary performance regression and other bugs in
|
||||
* SubjectDomainCombiner.combine
|
||||
*
|
||||
* @run main/othervm/policy=Regression.policy -Djava.security.auth.debug=combiner Regression
|
||||
*/
|
||||
|
||||
import javax.security.auth.*;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.security.CodeSource;
|
||||
import java.net.URL;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import javax.security.auth.Subject;
|
||||
import javax.security.auth.SubjectDomainCombiner;
|
||||
|
||||
public class Regression {
|
||||
|
||||
|
1
jdk/test/javax/security/auth/kerberos/TEST.properties
Normal file
1
jdk/test/javax/security/auth/kerberos/TEST.properties
Normal file
@ -0,0 +1 @@
|
||||
modules = java.security.jgss
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,16 +25,21 @@
|
||||
* @test
|
||||
* @bug 6268315
|
||||
* @bug 6273812
|
||||
* @modules jdk.security.auth
|
||||
* @summary Configuration should be provider-based
|
||||
* @build GetInstanceConfigSpi GetInstanceProvider
|
||||
* @run main/othervm -Djava.security.auth.login.config==${test.src}${/}GetInstance.config GetInstance
|
||||
*/
|
||||
|
||||
import javax.security.auth.login.*;
|
||||
|
||||
import java.security.*;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.NoSuchProviderException;
|
||||
import java.security.Provider;
|
||||
import java.security.Security;
|
||||
import java.security.URIParameter;
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import javax.security.auth.login.AppConfigurationEntry;
|
||||
import javax.security.auth.login.Configuration;
|
||||
|
||||
public class GetInstance {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,6 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @bug 6268315
|
||||
* @modules jdk.security.auth
|
||||
* @summary Configuration should be provider-based
|
||||
* @build GetInstanceConfigSpi GetInstanceProvider
|
||||
* @run main/othervm/policy=GetInstanceSecurity.policy GetInstanceSecurity
|
||||
@ -31,8 +32,10 @@
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.security.*;
|
||||
import javax.security.auth.login.*;
|
||||
import java.security.Policy;
|
||||
import java.security.Security;
|
||||
import java.security.URIParameter;
|
||||
import javax.security.auth.login.Configuration;
|
||||
|
||||
public class GetInstanceSecurity {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,9 +21,10 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4703361
|
||||
* @modules jdk.security.auth
|
||||
* @summary can not specify Configuration to LoginContext constructor
|
||||
*
|
||||
* @run main/othervm/policy=ConfigConstructor.policy -Djava.security.auth.login.config=file:${test.src}/ConfigConstructor.config ConfigConstructor
|
||||
@ -37,10 +38,13 @@
|
||||
*/
|
||||
|
||||
import java.util.Map;
|
||||
import javax.security.auth.*;
|
||||
import javax.security.auth.login.*;
|
||||
import javax.security.auth.spi.*;
|
||||
import javax.security.auth.callback.*;
|
||||
import javax.security.auth.Subject;
|
||||
import javax.security.auth.login.AppConfigurationEntry;
|
||||
import javax.security.auth.login.Configuration;
|
||||
import javax.security.auth.login.LoginContext;
|
||||
import javax.security.auth.login.LoginException;
|
||||
import javax.security.auth.spi.LoginModule;
|
||||
import javax.security.auth.callback.CallbackHandler;
|
||||
|
||||
public class ConfigConstructor {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,9 +21,10 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4703361
|
||||
* @modules jdk.security.auth
|
||||
* @summary can not specify Configuration to LoginContext constructor
|
||||
*
|
||||
* @run main/othervm/policy=ConfigConstructorNoPerm.policy -Djava.security.auth.login.config=file:${test.src}/ConfigConstructor.config ConfigConstructorNoPerm
|
||||
@ -36,10 +37,11 @@
|
||||
*/
|
||||
|
||||
import java.util.Map;
|
||||
import javax.security.auth.*;
|
||||
import javax.security.auth.login.*;
|
||||
import javax.security.auth.spi.*;
|
||||
import javax.security.auth.callback.*;
|
||||
import javax.security.auth.Subject;
|
||||
import javax.security.auth.login.AppConfigurationEntry;
|
||||
import javax.security.auth.login.Configuration;
|
||||
import javax.security.auth.login.LoginContext;
|
||||
import javax.security.auth.callback.CallbackHandler;
|
||||
|
||||
public class ConfigConstructorNoPerm {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,6 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @bug 4378100
|
||||
* @modules jdk.security.auth
|
||||
* @summary LoginContext doesn't reinit modules with new Subject
|
||||
* if authentication fails
|
||||
*
|
||||
@ -31,9 +32,9 @@
|
||||
* @run main/othervm -Djava.security.auth.login.config=file:${test.src}/ModuleSubject.config ModuleSubject
|
||||
*/
|
||||
|
||||
import javax.security.auth.*;
|
||||
import javax.security.auth.login.*;
|
||||
import java.security.Principal;
|
||||
import javax.security.auth.login.LoginContext;
|
||||
import javax.security.auth.login.LoginException;
|
||||
|
||||
public class ModuleSubject {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,10 +21,11 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @author Vincent Ryan
|
||||
* @bug 6228412
|
||||
* @modules java.security.sasl
|
||||
* @summary Check that a Properties object can be passed to the Sasl create
|
||||
* client and create server methods.
|
||||
*/
|
||||
@ -32,8 +33,12 @@
|
||||
import java.util.Hashtable;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import javax.security.sasl.*;
|
||||
import javax.security.auth.callback.*;
|
||||
import javax.security.sasl.Sasl;
|
||||
import javax.security.sasl.SaslClient;
|
||||
import javax.security.sasl.SaslException;
|
||||
import javax.security.sasl.SaslServer;
|
||||
import javax.security.auth.callback.Callback;
|
||||
import javax.security.auth.callback.CallbackHandler;
|
||||
import org.ietf.jgss.GSSException;
|
||||
|
||||
public class PassSysProps {
|
||||
|
Loading…
x
Reference in New Issue
Block a user