Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a warn log for AAD deprecated properties. #22565

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import com.azure.spring.aad.AADAuthorizationGrantType;
import com.azure.spring.aad.webapp.AuthorizationClientProperties;
import com.nimbusds.jose.jwk.source.RemoteJWKSet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
Expand Down Expand Up @@ -133,6 +135,8 @@ public List<String> getActiveDirectoryGroups() {
*/
public static class UserGroupProperties {

private final Log logger = LogFactory.getLog(UserGroupProperties.class);

/**
* Expected UserGroups that an authority will be granted to if found in the response from the MemeberOf Graph
* API Call.
Expand Down Expand Up @@ -175,7 +179,10 @@ public Boolean getEnableFullList() {
return enableFullList;
}

@Deprecated
public void setEnableFullList(Boolean enableFullList) {
logger.warn(" 'azure.activedirectory.user-group.enable-full-list' property detected! "
+ "Use 'azure.activedirectory.user-group.allowed-group-ids: all' instead!");
this.enableFullList = enableFullList;
}

Expand All @@ -190,6 +197,8 @@ public List<String> getAllowedGroups() {

@Deprecated
public void setAllowedGroups(List<String> allowedGroups) {
logger.warn(" 'azure.activedirectory.user-group.allowed-groups' property detected! " + " Use 'azure"
+ ".activedirectory.user-group.allowed-group-names' instead!");
this.allowedGroupNames = allowedGroups;
}

Expand Down