WIFI-1329: CloudSDK: SSID with Captive Portal Auth can't be configured

This commit is contained in:
Mike Hansen
2021-01-27 16:00:00 -05:00
parent 88f2d5298b
commit db1b0f6a0c
11 changed files with 240 additions and 361 deletions

View File

@@ -1,138 +1,52 @@
[
{
{
"model_type": "Profile",
"id": 5,
"customerId": 2,
"profileType": "captive_portal",
"name": "Captive-portal",
"details": {
"model_type": "CaptivePortalConfiguration",
"name": "Captive-portal",
"browserTitle": "Access the network as Guest",
"headerContent": "Captive Portal",
"userAcceptancePolicy": "Use this network at your own risk. No warranty of any kind.",
"successPageMarkdownText": "Welcome to the network",
"redirectURL": "",
"externalCaptivePortalURL": null,
"sessionTimeoutInMinutes": 60,
"logoFile": null,
"backgroundFile": null,
"walledGardenAllowlist": [
],
"usernamePasswordFile": {
"model_type": "ManagedFileInfo",
"md5checksum": null,
"lastModifiedTimestamp": null,
"apExportUrl": "userList",
"fileCategory": "UsernamePasswordList",
"fileType": "TEXT",
"altSlot": true
},
"authenticationType": "guest",
"radiusAuthMethod": "CHAP",
"maxUsersWithSameCredentials": 42,
"externalPolicyFile": null,
"backgroundPosition": "left_top",
"backgroundRepeat": "no_repeat",
"radiusServiceName": null,
"expiryType": "unlimited",
"userList": [
{
"model_type": "TimedAccessUserRecord",
"username": "customer",
"password": "testing123",
"activationTime": 1611262628973,
"expirationTime": 1611291428973,
"numDevices": 1,
"userDetails": {
"model_type": "TimedAccessUserDetails",
"firstName": "Pac",
"lastName": "Man",
"passwordNeedsReset": false
},
"userMacAddresses": [
{
"model_type": "MacAddress",
"address": "fKtg5upO",
"addressAsString": "7c:ab:60:e6:ea:4e"
}
],
"lastModifiedTimestamp": 0
"model_type": "CaptivePortalConfiguration",
"name": "Default",
"browserTitle": "Captive-portal",
"headerContent": "Captive Portal",
"userAcceptancePolicy": "Please agree to the following terms for using this network:",
"successPageMarkdownText": "You are now authorized and connected to the network.",
"redirectURL": "https://www.google.com",
"externalCaptivePortalURL": null,
"sessionTimeoutInMinutes": 10,
"logoFile": {
"model_type": "ManagedFileInfo",
"md5checksum": null,
"lastModifiedTimestamp": null,
"apExportUrl": "tip-logo-mobile.png",
"fileCategory": "CaptivePortalLogo",
"fileType": "PNG",
"altSlot": false
},
{
"model_type": "TimedAccessUserRecord",
"username": "customer",
"password": "testing123",
"activationTime": 1611262628974,
"expirationTime": 1611266228974,
"numDevices": 0,
"userDetails": {
"model_type": "TimedAccessUserDetails",
"firstName": "Q",
"lastName": "Bert",
"passwordNeedsReset": false
},
"userMacAddresses": [
{
"model_type": "MacAddress",
"address": "wJrQdqho",
"addressAsString": "c0:9a:d0:76:a8:68"
}
],
"lastModifiedTimestamp": 0
"backgroundFile": {
"model_type": "ManagedFileInfo",
"md5checksum": null,
"lastModifiedTimestamp": null,
"apExportUrl": "tip-logo.png",
"fileCategory": "CaptivePortalBackground",
"fileType": "PNG",
"altSlot": false
},
{
"model_type": "TimedAccessUserRecord",
"username": "customer2",
"password": "testing1234",
"activationTime": 1611262628974,
"expirationTime": 1611867428974,
"numDevices": 1,
"userDetails": {
"model_type": "TimedAccessUserDetails",
"firstName": "Duke",
"lastName": "Nukem",
"passwordNeedsReset": false
},
"userMacAddresses": [
{
"model_type": "MacAddress",
"address": "fKtg5upN",
"addressAsString": "7c:ab:60:e6:ea:4d"
}
],
"lastModifiedTimestamp": 0
},
{
"model_type": "TimedAccessUserRecord",
"username": "customer2",
"password": "testing1234",
"activationTime": 1611262628974,
"expirationTime": 1611349028974,
"numDevices": 0,
"userDetails": {
"model_type": "TimedAccessUserDetails",
"firstName": "Missile",
"lastName": "Commander",
"passwordNeedsReset": false
},
"userMacAddresses": [
{
"model_type": "MacAddress",
"address": "wJrQdqhj",
"addressAsString": "c0:9a:d0:76:a8:63"
}
],
"lastModifiedTimestamp": 0
}
],
"macAllowList": [
],
"profileType": "captive_portal"
"walledGardenAllowlist": [],
"usernamePasswordFile": null,
"authenticationType": "guest",
"radiusAuthMethod": "CHAP",
"maxUsersWithSameCredentials": 3,
"externalPolicyFile": null,
"backgroundPosition": "left_top",
"backgroundRepeat": "no_repeat",
"radiusServiceId": 0,
"expiryType": "time_limited",
"userList": [],
"macAllowList": [],
"profileType": "captive_portal"
},
"createdTimestamp": 1611262628978,
"lastModifiedTimestamp": 1611262628978,
"childProfileIds": [
]
}
]
"createdTimestamp": 1611779680397,
"lastModifiedTimestamp": 1611779680397,
"childProfileIds": []
}

View File

@@ -1,138 +1,52 @@
[
{
{
"model_type": "Profile",
"id": 5,
"customerId": 2,
"profileType": "captive_portal",
"name": "Captive-portal",
"details": {
"model_type": "CaptivePortalConfiguration",
"name": "Captive-portal",
"browserTitle": "Access the network as Guest",
"headerContent": "Captive Portal",
"userAcceptancePolicy": "Use this network at your own risk. No warranty of any kind.",
"successPageMarkdownText": "Welcome to the network",
"redirectURL": "",
"externalCaptivePortalURL": null,
"sessionTimeoutInMinutes": 60,
"logoFile": null,
"backgroundFile": null,
"walledGardenAllowlist": [
],
"usernamePasswordFile": {
"model_type": "ManagedFileInfo",
"md5checksum": null,
"lastModifiedTimestamp": null,
"apExportUrl": "userList",
"fileCategory": "UsernamePasswordList",
"fileType": "TEXT",
"altSlot": true
},
"authenticationType": "guest",
"radiusAuthMethod": "CHAP",
"maxUsersWithSameCredentials": 42,
"externalPolicyFile": null,
"backgroundPosition": "left_top",
"backgroundRepeat": "no_repeat",
"radiusServiceName": null,
"expiryType": "unlimited",
"userList": [
{
"model_type": "TimedAccessUserRecord",
"username": "customer",
"password": "testing123",
"activationTime": 1611262628973,
"expirationTime": 1611291428973,
"numDevices": 1,
"userDetails": {
"model_type": "TimedAccessUserDetails",
"firstName": "Pac",
"lastName": "Man",
"passwordNeedsReset": false
},
"userMacAddresses": [
{
"model_type": "MacAddress",
"address": "fKtg5upO",
"addressAsString": "7c:ab:60:e6:ea:4e"
}
],
"lastModifiedTimestamp": 0
"model_type": "CaptivePortalConfiguration",
"name": "Default",
"browserTitle": "Captive-portal",
"headerContent": "Captive Portal",
"userAcceptancePolicy": "Please agree to the following terms for using this network:",
"successPageMarkdownText": "You are now authorized and connected to the network.",
"redirectURL": "https://www.google.com",
"externalCaptivePortalURL": null,
"sessionTimeoutInMinutes": 10,
"logoFile": {
"model_type": "ManagedFileInfo",
"md5checksum": null,
"lastModifiedTimestamp": null,
"apExportUrl": "tip-logo-mobile.png",
"fileCategory": "CaptivePortalLogo",
"fileType": "PNG",
"altSlot": false
},
{
"model_type": "TimedAccessUserRecord",
"username": "customer",
"password": "testing123",
"activationTime": 1611262628974,
"expirationTime": 1611266228974,
"numDevices": 0,
"userDetails": {
"model_type": "TimedAccessUserDetails",
"firstName": "Q",
"lastName": "Bert",
"passwordNeedsReset": false
},
"userMacAddresses": [
{
"model_type": "MacAddress",
"address": "wJrQdqho",
"addressAsString": "c0:9a:d0:76:a8:68"
}
],
"lastModifiedTimestamp": 0
"backgroundFile": {
"model_type": "ManagedFileInfo",
"md5checksum": null,
"lastModifiedTimestamp": null,
"apExportUrl": "tip-logo.png",
"fileCategory": "CaptivePortalBackground",
"fileType": "PNG",
"altSlot": false
},
{
"model_type": "TimedAccessUserRecord",
"username": "customer2",
"password": "testing1234",
"activationTime": 1611262628974,
"expirationTime": 1611867428974,
"numDevices": 1,
"userDetails": {
"model_type": "TimedAccessUserDetails",
"firstName": "Duke",
"lastName": "Nukem",
"passwordNeedsReset": false
},
"userMacAddresses": [
{
"model_type": "MacAddress",
"address": "fKtg5upN",
"addressAsString": "7c:ab:60:e6:ea:4d"
}
],
"lastModifiedTimestamp": 0
},
{
"model_type": "TimedAccessUserRecord",
"username": "customer2",
"password": "testing1234",
"activationTime": 1611262628974,
"expirationTime": 1611349028974,
"numDevices": 0,
"userDetails": {
"model_type": "TimedAccessUserDetails",
"firstName": "Missile",
"lastName": "Commander",
"passwordNeedsReset": false
},
"userMacAddresses": [
{
"model_type": "MacAddress",
"address": "wJrQdqhj",
"addressAsString": "c0:9a:d0:76:a8:63"
}
],
"lastModifiedTimestamp": 0
}
],
"macAllowList": [
],
"profileType": "captive_portal"
"walledGardenAllowlist": [],
"usernamePasswordFile": null,
"authenticationType": "guest",
"radiusAuthMethod": "CHAP",
"maxUsersWithSameCredentials": 3,
"externalPolicyFile": null,
"backgroundPosition": "left_top",
"backgroundRepeat": "no_repeat",
"radiusServiceId": 0,
"expiryType": "time_limited",
"userList": [],
"macAllowList": [],
"profileType": "captive_portal"
},
"createdTimestamp": 1611262628978,
"lastModifiedTimestamp": 1611262628978,
"childProfileIds": [
]
}
]
"createdTimestamp": 1611779680397,
"lastModifiedTimestamp": 1611779680397,
"childProfileIds": []
}

View File

@@ -46,6 +46,7 @@ import com.telecominfraproject.wlan.customer.service.CustomerServiceInterface;
import com.telecominfraproject.wlan.equipment.EquipmentServiceInterface;
import com.telecominfraproject.wlan.equipment.models.ApElementConfiguration;
import com.telecominfraproject.wlan.equipment.models.Equipment;
import com.telecominfraproject.wlan.equipment.models.NetworkForwardMode;
import com.telecominfraproject.wlan.firmware.FirmwareServiceInterface;
import com.telecominfraproject.wlan.firmware.models.FirmwareTrackAssignmentDetails;
import com.telecominfraproject.wlan.firmware.models.FirmwareTrackAssignmentRecord;
@@ -65,6 +66,9 @@ import com.telecominfraproject.wlan.profile.metrics.ServiceMetricsCollectionConf
import com.telecominfraproject.wlan.profile.models.Profile;
import com.telecominfraproject.wlan.profile.models.ProfileContainer;
import com.telecominfraproject.wlan.profile.models.ProfileType;
import com.telecominfraproject.wlan.profile.models.common.FileCategory;
import com.telecominfraproject.wlan.profile.models.common.FileType;
import com.telecominfraproject.wlan.profile.models.common.ManagedFileInfo;
import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration;
import com.telecominfraproject.wlan.profile.network.models.RadioProfileConfiguration;
import com.telecominfraproject.wlan.profile.radius.models.RadiusProfile;
@@ -321,20 +325,48 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
profileRf.setDetails(rfConfig);
profileRf = profileServiceInterface.create(profileRf);
//Captive portal profile
Profile profileCaptivePortal = new Profile();
profileCaptivePortal.setCustomerId(customer.getId());
profileCaptivePortal.setName("Captive-portal");
CaptivePortalConfiguration captivePortalConfig = new CaptivePortalConfiguration();
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.guest);
captivePortalConfig.setBrowserTitle("Access the network as Guest");
captivePortalConfig.setExpiryType(SessionExpiryType.unlimited);
captivePortalConfig.setMaxUsersWithSameCredentials(42);
captivePortalConfig.setName(profileCaptivePortal.getName());
captivePortalConfig.setSuccessPageMarkdownText("Welcome to the network");
captivePortalConfig.setUserAcceptancePolicy("Use this network at your own risk. No warranty of any kind.");
profileCaptivePortal.setDetails(captivePortalConfig);
profileCaptivePortal = profileServiceInterface.create(profileCaptivePortal);
// Captive portal profile
Profile profileCaptivePortal = new Profile();
profileCaptivePortal.setCustomerId(customer.getId());
profileCaptivePortal.setName("Captive-portal");
profileCaptivePortal.setProfileType(ProfileType.captive_portal);
CaptivePortalConfiguration captivePortalConfig = new CaptivePortalConfiguration();
captivePortalConfig.setRedirectURL("https://www.google.com");
captivePortalConfig.setSessionTimeoutInMinutes(10);
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.guest);
ManagedFileInfo backgroundFile = new ManagedFileInfo();
backgroundFile.setFileCategory(FileCategory.CaptivePortalBackground);
backgroundFile.setFileType(FileType.PNG);
backgroundFile.setApExportUrl("tip-logo.png");
ManagedFileInfo logoFile = new ManagedFileInfo();
logoFile.setFileCategory(FileCategory.CaptivePortalLogo);
logoFile.setFileType(FileType.PNG);
logoFile.setApExportUrl("tip-logo-mobile.png");
captivePortalConfig.setBackgroundFile(backgroundFile);
captivePortalConfig.setLogoFile(logoFile);
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.guest);
captivePortalConfig.setBrowserTitle(profileCaptivePortal.getName());
profileCaptivePortal.setDetails(captivePortalConfig);
profileCaptivePortal = profileServiceInterface.create(profileCaptivePortal);
Profile profileSsid_captive = new Profile();
profileSsid_captive.setCustomerId(customer.getId());
profileSsid_captive.setName("TipWlan-captive");
SsidConfiguration ssidConfig_captive = SsidConfiguration.createWithDefaults();
Set<RadioType> appliedRadios_3_radios_captive = new HashSet<RadioType>();
appliedRadios_3_radios_captive.add(RadioType.is2dot4GHz);
ssidConfig_captive.setAppliedRadios(appliedRadios_3_radios_captive);
ssidConfig_captive.setSsid("TipWlan-captive");
ssidConfig_captive.setSecureMode(SecureMode.wpa2PSK);
ssidConfig_captive.setRadiusAcountingServiceInterval(60);
ssidConfig_captive.setCaptivePortalId(profileCaptivePortal.getId());
ssidConfig_captive.setKeyStr(DEFAULT_KEYSTRING);
ssidConfig_captive.setForwardMode(NetworkForwardMode.NAT);
profileSsid_captive.setDetails(ssidConfig_captive);
profileSsid_captive.getChildProfileIds().add(profileCaptivePortal.getId());
profileSsid_captive = profileServiceInterface.create(profileSsid_captive);
Profile profileAp_3_radios = new Profile();
profileAp_3_radios.setCustomerId(customer.getId());

View File

@@ -71,8 +71,11 @@ import com.telecominfraproject.wlan.location.service.LocationServiceInterface;
import com.telecominfraproject.wlan.portaluser.PortalUserServiceInterface;
import com.telecominfraproject.wlan.portaluser.models.PortalUser;
import com.telecominfraproject.wlan.profile.ProfileServiceInterface;
import com.telecominfraproject.wlan.profile.captiveportal.models.BackgroundPosition;
import com.telecominfraproject.wlan.profile.captiveportal.models.BackgroundRepeat;
import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalAuthenticationType;
import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalConfiguration;
import com.telecominfraproject.wlan.profile.captiveportal.models.RadiusAuthenticationMethod;
import com.telecominfraproject.wlan.profile.captiveportal.models.SessionExpiryType;
import com.telecominfraproject.wlan.profile.captiveportal.user.models.TimedAccessUserDetails;
import com.telecominfraproject.wlan.profile.captiveportal.user.models.TimedAccessUserRecord;
@@ -263,7 +266,6 @@ public class AllInOneStartListener implements ApplicationRunner {
location_2 = locationServiceInterface.create(location_2);
Profile profileRadius = new Profile();
profileRadius.setCustomerId(customer.getId());
profileRadius.setProfileType(ProfileType.radius);
@@ -280,13 +282,12 @@ public class AllInOneStartListener implements ApplicationRunner {
}
primaryRadiusAccountingServer.setSecret(RadiusProfile.DEFAULT_RADIUS_SECRET);
primaryRadiusAccountingServer.setTimeout(RadiusProfile.DEFAULT_RADIUS_TIMEOUT);
radiusDetails.setPrimaryRadiusAccountingServer(primaryRadiusAccountingServer);
profileRadius.setDetails(radiusDetails);
profileRadius = profileServiceInterface.create(profileRadius);
Profile profileSsid_3_radios = new Profile();
profileSsid_3_radios.setCustomerId(customer.getId());
profileSsid_3_radios.setName("TipWlan-cloud-3-radios");
@@ -331,28 +332,42 @@ public class AllInOneStartListener implements ApplicationRunner {
profileCaptivePortal.setProfileType(ProfileType.captive_portal);
CaptivePortalConfiguration captivePortalConfig = new CaptivePortalConfiguration();
captivePortalConfig.setRedirectURL("https://www.google.com");
captivePortalConfig.setSessionTimeoutInMinutes(10);
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.guest);
captivePortalConfig.setBrowserTitle("Access the network as Guest");
captivePortalConfig.setExpiryType(SessionExpiryType.unlimited);
captivePortalConfig.setMaxUsersWithSameCredentials(42);
captivePortalConfig.setName(profileCaptivePortal.getName());
captivePortalConfig.setSuccessPageMarkdownText("Welcome to the network");
captivePortalConfig.setUserAcceptancePolicy("Use this network at your own risk. No warranty of any kind.");
List<TimedAccessUserRecord> userList = new ArrayList<>();
constructCaptivePortalUserList(userList);
captivePortalConfig.setUserList(userList);
ManagedFileInfo info = new ManagedFileInfo();
info.setAltSlot(true);
info.setApExportUrl("userList");
info.setFileCategory(FileCategory.UsernamePasswordList);
info.setFileType(FileType.TEXT);
captivePortalConfig.setUsernamePasswordFile(info);
ManagedFileInfo backgroundFile = new ManagedFileInfo();
backgroundFile.setFileCategory(FileCategory.CaptivePortalBackground);
backgroundFile.setFileType(FileType.PNG);
backgroundFile.setApExportUrl("tip-logo.png");
ManagedFileInfo logoFile = new ManagedFileInfo();
logoFile.setFileCategory(FileCategory.CaptivePortalLogo);
logoFile.setFileType(FileType.PNG);
logoFile.setApExportUrl("tip-logo-mobile.png");
captivePortalConfig.setBackgroundFile(backgroundFile);
captivePortalConfig.setLogoFile(logoFile);
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.guest);
captivePortalConfig.setBrowserTitle(profileCaptivePortal.getName());
profileCaptivePortal.setDetails(captivePortalConfig);
profileCaptivePortal = profileServiceInterface.create(profileCaptivePortal);
Profile profileSsid_captive = new Profile();
profileSsid_captive.setCustomerId(customer.getId());
profileSsid_captive.setName("TipWlan-captive");
SsidConfiguration ssidConfig_captive = SsidConfiguration.createWithDefaults();
Set<RadioType> appliedRadios_3_radios_captive = new HashSet<RadioType>();
appliedRadios_3_radios_captive.add(RadioType.is2dot4GHz);
ssidConfig_captive.setAppliedRadios(appliedRadios_3_radios_captive);
ssidConfig_captive.setSsid("TipWlan-captive");
ssidConfig_captive.setSecureMode(SecureMode.wpa2PSK);
ssidConfig_captive.setRadiusAcountingServiceInterval(60);
ssidConfig_captive.setCaptivePortalId(profileCaptivePortal.getId());
ssidConfig_captive.setKeyStr(DEFAULT_KEYSTRING);
ssidConfig_captive.setForwardMode(NetworkForwardMode.NAT);
profileSsid_captive.setDetails(ssidConfig_captive);
profileSsid_captive.getChildProfileIds().add(profileCaptivePortal.getId());
profileSsid_captive = profileServiceInterface.create(profileSsid_captive);
Profile apEventRates = new Profile();
apEventRates.setCustomerId(customer.getId());
apEventRates.setName("ApEventRateProfile-default");
@@ -384,7 +399,6 @@ public class AllInOneStartListener implements ApplicationRunner {
// TODO Auto-generated catch block
e.printStackTrace();
}
profileAp_3_radios.getChildProfileIds().add(profileSsid_3_radios.getId());
profileAp_3_radios.getChildProfileIds().add(profileRf.getId());
profileAp_3_radios.getChildProfileIds().add(apEventRates.getId());
@@ -487,7 +501,7 @@ public class AllInOneStartListener implements ApplicationRunner {
createAlarmsForEquipment(equipment);
createClientSessions(equipment, ssidConfig_3_radios);
createClientSessions(equipment, ssidConfig_captive);
createServiceMetrics(equipment);
@@ -860,7 +874,7 @@ public class AllInOneStartListener implements ApplicationRunner {
TimedAccessUserRecord userRecord2 = new TimedAccessUserRecord();
userRecord2.setActivationTime(System.currentTimeMillis());
userRecord2.setExpirationTime(System.currentTimeMillis() + 1000 * 60 * 60); // 1
// hr
// hr
userRecord2.setPassword("testing123");
userRecord2.setUsername("customer");
TimedAccessUserDetails userDetails2 = new TimedAccessUserDetails();

View File

@@ -2498,8 +2498,9 @@ components:
$ref: '#/components/schemas/BackgroundPosition'
backgroundRepeat:
$ref: '#/components/schemas/BackgroundRepeat'
radiusServiceName:
type: string
radiusServiceId:
type: integer
format: int64
expiryType:
$ref: '#/components/schemas/SessionExpiryType'
userList:

View File

@@ -29,7 +29,9 @@ public class ElementRadioConfiguration extends BaseJsonModel {
private Integer channelNumber; // The channel that was picked through the cloud's automatic assigment
private Integer manualChannelNumber; // The channel that was manually entered
private Integer backupChannelNumber; // Backup channel (this is never set by the customer: it's deducted from the primary channel (either manual or auto)
private List<Integer> allowedChannels = new LinkedList<>();
private SourceSelectionValue rxCellSizeDb;
private SourceSelectionValue probeResponseThresholdDb;
private SourceSelectionValue clientDisconnectThresholdDb;

View File

@@ -1354,7 +1354,7 @@ components:
- passpoint_osu_id_provider
Profile:
description: Each AccessPoint refers to at most one profile of type equipment_ap. Each ApNetworkConfiguration (equipment_ap) profile refers to 0-N SSID profiles, 1 Metrics Profile and 1 RADIUS Service Profile via its childProfileIds property, and . Each SSID profile refers to 0-N Passpoint Profiles (for authenticated SSIDs) and 0-N Id Provider Profiles, (Open authentication SSIDs), and at most 1 Captive Portal Profile and 1 Bonjour Gateway Profile via its childProfileIds property. Each Captive Portal Profile refers to at most 1 RADIUS Service Profile via its childProfileIds property. Each Passpoint Profile refers to 0-N Id Provider Profiles, 1 Operator Profile, and 1 Venue Profile, via its childProfileIds property.
description: Each AccessPoint refers to at most one profile of type equipment_ap. Each ApNetworkConfiguration (equipment_ap) profile refers to 0-N SSID profiles, 0-1 Metrics Profile. Each SSID profile refers to 0-N Passpoint Profiles (for authenticated SSIDs), 0-1 Radius Profiles for RadiusService, and RadiusAccountingService (both as child profile Id, and attributes in profile details), and at most 1 Captive Portal Profile and 1 Bonjour Gateway Profile via its childProfileIds property. Each Captive Portal Profile refers to at most 1 RADIUS Service Profile via its childProfileIds and radiusServiceId property. Each Passpoint Profile refers to 0-N Id Provider Profiles, 1 Operator Profile, and 1 Venue Profile, via its childProfileIds property.
type: object
properties:
id:
@@ -1483,10 +1483,11 @@ components:
sessionTimeoutInMinutes:
type: integer
format: int32
logoFile:
$ref: '#/components/schemas/ManagedFileInfo'
backgroundFile:
$ref: '#/components/schemas/ManagedFileInfo'
allOf:
logoFile:
$ref: '#/components/schemas/ManagedFileInfo'
backgroundFile:
$ref: '#/components/schemas/ManagedFileInfo'
walledGardenAllowlist:
type: array
items:
@@ -1506,8 +1507,9 @@ components:
$ref: '#/components/schemas/BackgroundPosition'
backgroundRepeat:
$ref: '#/components/schemas/BackgroundRepeat'
radiusServiceName:
type: string
radiusServiceId:
type: integer
format: int64
expiryType:
$ref: '#/components/schemas/SessionExpiryType'
userList:

View File

@@ -98,7 +98,7 @@ public class CaptivePortalConfiguration extends ProfileDetails implements Pushab
private ManagedFileInfo externalPolicyFile;
private BackgroundPosition backgroundPosition;
private BackgroundRepeat backgroundRepeat;
private String radiusServiceName;
private long radiusServiceId;
private SessionExpiryType expiryType;
private List<TimedAccessUserRecord> userList = new ArrayList<>();
@@ -117,7 +117,6 @@ public class CaptivePortalConfiguration extends ProfileDetails implements Pushab
setSuccessPageMarkdownText(DEFAULT_SUCCESS_TEXT);
setBackgroundPosition(BackgroundPosition.left_top);
setBackgroundRepeat(BackgroundRepeat.no_repeat);
setRadiusServiceName(null);
setRadiusAuthMethod(RadiusAuthenticationMethod.CHAP);
setExpiryType(SessionExpiryType.time_limited);
}
@@ -266,12 +265,12 @@ public class CaptivePortalConfiguration extends ProfileDetails implements Pushab
this.usernamePasswordFile = usernamePasswordFile;
}
public String getRadiusServiceName() {
return radiusServiceName;
public long getRadiusServiceId() {
return radiusServiceId;
}
public void setRadiusServiceName(String radiusServiceName) {
this.radiusServiceName = radiusServiceName;
public void setRadiusServiceId(long radiusServiceId) {
this.radiusServiceId = radiusServiceId;
}
public RadiusAuthenticationMethod getRadiusAuthMethod() {
@@ -306,50 +305,43 @@ public class CaptivePortalConfiguration extends ProfileDetails implements Pushab
this.macAllowList = macAllowList;
}
@Override
public int hashCode() {
return Objects.hash(authenticationType, backgroundFile, backgroundPosition, backgroundRepeat, browserTitle,
expiryType, externalCaptivePortalURL, externalPolicyFile, headerContent, logoFile, macAllowList,
maxUsersWithSameCredentials, name, radiusAuthMethod, radiusServiceId, redirectURL,
sessionTimeoutInMinutes, successPageMarkdownText, userAcceptancePolicy, userList, usernamePasswordFile,
walledGardenAllowlist);
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + Objects.hash(authenticationType, backgroundFile, backgroundPosition, backgroundRepeat,
browserTitle, expiryType, externalCaptivePortalURL, externalPolicyFile, headerContent, logoFile,
macAllowList, maxUsersWithSameCredentials, name, radiusAuthMethod, radiusServiceName, redirectURL,
sessionTimeoutInMinutes, successPageMarkdownText, userAcceptancePolicy, userList, usernamePasswordFile,
walledGardenAllowlist);
return result;
}
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
CaptivePortalConfiguration other = (CaptivePortalConfiguration) obj;
return authenticationType == other.authenticationType && Objects.equals(backgroundFile, other.backgroundFile)
&& backgroundPosition == other.backgroundPosition && backgroundRepeat == other.backgroundRepeat
&& Objects.equals(browserTitle, other.browserTitle) && expiryType == other.expiryType
&& Objects.equals(externalCaptivePortalURL, other.externalCaptivePortalURL)
&& Objects.equals(externalPolicyFile, other.externalPolicyFile)
&& Objects.equals(headerContent, other.headerContent) && Objects.equals(logoFile, other.logoFile)
&& Objects.equals(macAllowList, other.macAllowList)
&& maxUsersWithSameCredentials == other.maxUsersWithSameCredentials && Objects.equals(name, other.name)
&& radiusAuthMethod == other.radiusAuthMethod && radiusServiceId == other.radiusServiceId
&& Objects.equals(redirectURL, other.redirectURL)
&& sessionTimeoutInMinutes == other.sessionTimeoutInMinutes
&& Objects.equals(successPageMarkdownText, other.successPageMarkdownText)
&& Objects.equals(userAcceptancePolicy, other.userAcceptancePolicy)
&& Objects.equals(userList, other.userList)
&& Objects.equals(usernamePasswordFile, other.usernamePasswordFile)
&& Objects.equals(walledGardenAllowlist, other.walledGardenAllowlist);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof CaptivePortalConfiguration)) {
return false;
}
CaptivePortalConfiguration other = (CaptivePortalConfiguration) obj;
return authenticationType == other.authenticationType && Objects.equals(backgroundFile, other.backgroundFile)
&& backgroundPosition == other.backgroundPosition && backgroundRepeat == other.backgroundRepeat
&& Objects.equals(browserTitle, other.browserTitle) && expiryType == other.expiryType
&& Objects.equals(externalCaptivePortalURL, other.externalCaptivePortalURL)
&& Objects.equals(externalPolicyFile, other.externalPolicyFile)
&& Objects.equals(headerContent, other.headerContent) && Objects.equals(logoFile, other.logoFile)
&& Objects.equals(macAllowList, other.macAllowList)
&& maxUsersWithSameCredentials == other.maxUsersWithSameCredentials && Objects.equals(name, other.name)
&& radiusAuthMethod == other.radiusAuthMethod
&& Objects.equals(radiusServiceName, other.radiusServiceName)
&& Objects.equals(redirectURL, other.redirectURL)
&& sessionTimeoutInMinutes == other.sessionTimeoutInMinutes
&& Objects.equals(successPageMarkdownText, other.successPageMarkdownText)
&& Objects.equals(userAcceptancePolicy, other.userAcceptancePolicy)
&& Objects.equals(userList, other.userList)
&& Objects.equals(usernamePasswordFile, other.usernamePasswordFile)
&& Objects.equals(walledGardenAllowlist, other.walledGardenAllowlist);
}
@Override
@Override
public CaptivePortalConfiguration clone() {
CaptivePortalConfiguration ret = (CaptivePortalConfiguration)super.clone();
@@ -363,12 +355,18 @@ public class CaptivePortalConfiguration extends ProfileDetails implements Pushab
}
if(userList!=null) {
List<TimedAccessUserRecord> retUserList = new ArrayList<>();
userList.stream().forEach(c -> retUserList.add(c.clone()));
ret.setUserList(new ArrayList<>(userList));
}
if(macAllowList!=null) {
ret.setMacAllowList(new ArrayList<>(macAllowList));
}
if (logoFile != null) ret.logoFile = logoFile.clone();
if (backgroundFile != null) ret.backgroundFile = backgroundFile.clone();
if (externalPolicyFile != null) ret.externalPolicyFile = externalPolicyFile.clone();
return ret;
}
@@ -528,6 +526,6 @@ public class CaptivePortalConfiguration extends ProfileDetails implements Pushab
@Override
public boolean needsToBeUpdatedOnDevice(CaptivePortalConfiguration previousVersion) {
return !equals(previousVersion);
return !Objects.equals(this, previousVersion);
}
}

View File

@@ -320,8 +320,8 @@ public class SsidConfiguration extends ProfileDetails implements PushableConfigu
return radiusServiceId;
}
public void setRadiusServiceId(long radiusServiceName) {
this.radiusServiceId = radiusServiceName;
public void setRadiusServiceId(long radiusServiceId) {
this.radiusServiceId = radiusServiceId;
}
public Integer getRadiusAcountingServiceInterval() {

View File

@@ -81,7 +81,7 @@ components:
- passpoint_osu_id_provider
Profile:
description: Each AccessPoint refers to at most one profile of type equipment_ap. Each ApNetworkConfiguration (equipment_ap) profile refers to 0-N SSID profiles, 0-1 Metrics Profile. Each SSID profile refers to 0-N Passpoint Profiles (for authenticated SSIDs), 0-2 Radius Profiles for RadiusService, RadiusAccountingService (both as child profile Ids, and attributes in profile details), and at most 1 Captive Portal Profile and 1 Bonjour Gateway Profile via its childProfileIds property. Each Captive Portal Profile refers to at most 1 RADIUS Service Profile via its childProfileIds property. Each Passpoint Profile refers to 0-N Id Provider Profiles, 1 Operator Profile, and 1 Venue Profile, via its childProfileIds property.
description: Each AccessPoint refers to at most one profile of type equipment_ap. Each ApNetworkConfiguration (equipment_ap) profile refers to 0-N SSID profiles, 0-1 Metrics Profile. Each SSID profile refers to 0-N Passpoint Profiles (for authenticated SSIDs), 0-1 Radius Profiles for RadiusService, and RadiusAccountingService (both as child profile Id, and attributes in profile details), and at most 1 Captive Portal Profile and 1 Bonjour Gateway Profile via its childProfileIds property. Each Captive Portal Profile refers to at most 1 RADIUS Service Profile via its childProfileIds property. Each Passpoint Profile refers to 0-N Id Provider Profiles, 1 Operator Profile, and 1 Venue Profile, via its childProfileIds property.
type: object
properties:
id:
@@ -232,8 +232,9 @@ components:
$ref: '#/components/schemas/BackgroundPosition'
backgroundRepeat:
$ref: '#/components/schemas/BackgroundRepeat'
radiusServiceName:
type: string
radiusServiceId:
type: integer
format: int64
expiryType:
$ref: '#/components/schemas/SessionExpiryType'
userList:

View File

@@ -2502,8 +2502,9 @@ components:
$ref: '#/components/schemas/BackgroundPosition'
backgroundRepeat:
$ref: '#/components/schemas/BackgroundRepeat'
radiusServiceName:
type: string
radiusServiceId:
type: integer
format: int64
expiryType:
$ref: '#/components/schemas/SessionExpiryType'
userList: