Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/data-file-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
data-filename: "51Degrees-EnterpriseV4.ipi.gz"
secrets:
token: ${{ secrets.ACCESS_TOKEN }}
data-key: ${{ secrets.DEVICE_DETECTION_KEY }}
data-key: ${{ secrets.IP_INTELLIGENCE_KEY }}
data-url: ${{ secrets.IPI_DATA_FILE_URL }}
2 changes: 1 addition & 1 deletion .github/workflows/nightly-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
data-filename: "51Degrees-EnterpriseV4.ipi.gz"
secrets:
token: ${{ secrets.ACCESS_TOKEN }}
data-key: ${{ secrets.DEVICE_DETECTION_KEY }}
data-key: ${{ secrets.IP_INTELLIGENCE_KEY }}
data-url: ${{ secrets.IPI_DATA_FILE_URL }}

PackageUpdate:
Expand Down
8 changes: 4 additions & 4 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following secrets are required:
* Example: `github_pat_l0ng_r4nd0m_s7r1ng`

The following secrets are required to run on-premise tests:
* `DEVICE_DETECTION_KEY` - [license key](https://51degrees.com/pricing) for downloading assets (enterprise IPI data file)
* `IP_INTELLIGENCE_KEY` - [license key](https://51degrees.com/pricing) for downloading assets (enterprise IPI data file)
* Example: `V3RYL0NGR4ND0M57R1NG`

The following secrets are requred to run cloud tests:
Expand All @@ -22,8 +22,8 @@ The following secrets are required for publishing releases (this should only be
* `CODE_SIGNING_CERT_PASSWORD` - Password for the `CODE_SIGNING_CERT`

The following secrets are optional:
* `DEVICE_DETECTION_URL` - URL for downloading the enterprise TAC hash file
* Default: `https://distributor.51degrees.com/api/v2/download?LicenseKeys=DEVICE_DETECTION_KEY&Type=HashV41&Download=True&Product=V4TAC`
* `IPI_DATA_FILE_URL` - URL for downloading the enterprise IP Intelligence data file
* Default: `https://distributor.51degrees.com/api/v2/download?LicenseKeys=IP_INTELLIGENCE_KEY&Type=IPIV41&Download=True&Product=IPIV4Enterprise`

## Integration Tests

Expand All @@ -48,7 +48,7 @@ graph TD
It performs the following steps:

1. Clone Examples Repo: Clone the "ip-intelligence-java-examples" repository into the common-ci directory.
3. Set up test files: Move the 51Degrees-EnterpriseIpiV41.ipi file to the ip-intelligence-java-examples/ip-intelligence-data directory and download Evidence and User-Agent files into ip-intelligence-data directory.
3. Set up test files: Move the 51Degrees-EnterpriseIpiV41.ipi file to the ip-intelligence-java-examples/ip-intelligence-data directory and download evidence files into ip-intelligence-data directory.
4. Enter ip-intelligence-examples directory: Changes the current working directory to the ip-intelligence-java-examples folder.
5. Set package dependency version: Sets the version of the ip-intelligence package dependency for the examples to the specified Version parameter. This will be the version installed in the local repository found in the .m2 folder.
6. Test Examples: Runs the Maven clean test command, passing the TestResourceKey, SuperResourceKey, and LicenseKey as parameters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@

/**
* Encapsulates a list of {@link IPIntelligenceData} instances which can be returned
* by the 51Degrees Cloud service when certain evidence is provided (e.g. TAC)
* by the 51Degrees Cloud service when the evidence provided matches more than
* one profile.
* @deprecated multi-profile responses (e.g. hardware profile lookup) are a
* device detection feature and have no equivalent in IP Intelligence. This
* class will be removed in a future version.
*/
@Deprecated
public class MultiIPIDataCloud
extends AspectDataBase
implements MultiProfileData<IPIntelligenceData> {
private static final String DEVICE_LIST_KEY = "profiles";
private static final String PROFILE_LIST_KEY = "profiles";

/**
* Constructs a new instance with a non-thread-safe, case-insensitive
Expand All @@ -58,7 +63,7 @@ public MultiIPIDataCloud(
FlowData flowData,
AspectEngine<? extends AspectData, ? extends AspectPropertyMetaData> engine) {
super(logger, flowData, engine);
this.put(DEVICE_LIST_KEY, new ArrayList<IPIntelligenceData>());
this.put(PROFILE_LIST_KEY, new ArrayList<IPIntelligenceData>());
}

/**
Expand All @@ -77,7 +82,7 @@ public MultiIPIDataCloud(
AspectEngine<? extends AspectData, ? extends AspectPropertyMetaData> engine,
MissingPropertyService missingPropertyService) {
super(logger, flowData, engine, missingPropertyService);
this.put(DEVICE_LIST_KEY, new ArrayList<IPIntelligenceData>());
this.put(PROFILE_LIST_KEY, new ArrayList<IPIntelligenceData>());
}

@Override
Expand All @@ -96,6 +101,6 @@ public void addProfile(IPIntelligenceData profile) {
*/
@SuppressWarnings("unchecked")
private List<IPIntelligenceData> getDeviceList() {
return (List<IPIntelligenceData>)this.get(DEVICE_LIST_KEY);
return (List<IPIntelligenceData>)this.get(PROFILE_LIST_KEY);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
* Engine that takes the JSON response from the {@link CloudRequestEngine} and
* uses it populate a {@link MultiIPIDataCloud} instance for easier consumption.
* @see <a href="https://github.com/51Degrees/specifications/blob/main/ip-intelligence-specification/pipeline-elements/hardware-profile-lookup-cloud.md">Specification</a>
* @deprecated hardware profile lookup is a device detection feature and has
* no equivalent in IP Intelligence. This engine will be removed in a future
* version.
*/
@Deprecated
public class HardwareProfileCloudEngine
extends PropertyKeyedCloudEngineBase<MultiIPIDataCloud, IPIntelligenceData> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
import java.util.List;


/**
* Builder for the {@link HardwareProfileCloudEngine}.
* @deprecated hardware profile lookup is a device detection feature and has
* no equivalent in IP Intelligence. This builder will be removed in a future
* version.
*/
@Deprecated
@ElementBuilder
public class HardwareProfileCloudEngineBuilder extends AspectEngineBuilderBase<
HardwareProfileCloudEngineBuilder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@

package fiftyone.ipintelligence.cloud;

import fiftyone.ipintelligence.shared.testhelpers.UserAgentGenerator;
import fiftyone.ipintelligence.shared.testhelpers.IpAddressGenerator;
import fiftyone.pipeline.util.FileFinder;

import static fiftyone.ipintelligence.shared.testhelpers.FileUtils.IP_ADDRESSES_FILE_NAME;

public class TestsBase {

private WrapperCloud wrapper = null;
private UserAgentGenerator userAgents;
private IpAddressGenerator ipAddresses;

protected WrapperCloud getWrapper() {
return wrapper;
}

protected UserAgentGenerator getUserAgents() {
return userAgents;
protected IpAddressGenerator getIpAddresses() {
return ipAddresses;
}

protected void testInitialize() throws Exception {
wrapper = new WrapperCloud();
userAgents = new UserAgentGenerator(
ipAddresses = new IpAddressGenerator(
FileFinder.getFilePath(IP_ADDRESSES_FILE_NAME));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import fiftyone.ipintelligence.cloud.TestsBase;
import fiftyone.ipintelligence.cloud.ValueTests;
import fiftyone.ipintelligence.shared.testhelpers.UserAgentGenerator;

import org.junit.After;
import org.junit.Before;
Expand All @@ -34,8 +33,6 @@
@Ignore
public class ValueCloudTests extends TestsBase {

private UserAgentGenerator userAgents;

@Before
public void init() throws Exception {
testInitialize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@

package fiftyone.ipintelligence.engine.onpremise;

/**
* @deprecated match methods are a device detection (Hash algorithm) concept
* and are not used by IP Intelligence. This class will be removed in a
* future version.
*/
@Deprecated
public class Enums {
/**
* Enumeration of possible match methods used by the Hash engine.
* Enumeration of possible match methods used by the device detection
* Hash engine.
* @deprecated not used by IP Intelligence; will be removed in a future
* version.
*/
@Deprecated
public enum MatchMethods {
NONE,
PERFORMANCE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,14 @@
package fiftyone.ipintelligence.engine.onpremise.data;

import fiftyone.ipintelligence.shared.IPIntelligenceData;
import fiftyone.pipeline.engines.data.AspectPropertyValue;

import java.util.List;

/**
* On-premise specific interface for {@link IPIntelligenceData}.
* @see <a href="https://github.com/51Degrees/specifications/blob/main/ip-intelligence-specification/pipeline-elements/ip-intelligence-on-premise.md#element-data">Specification</a>
* @deprecated "Hash" refers to the device detection algorithm and has no
* meaning for IP Intelligence. Use {@link IPIntelligenceDataOnPremise}
* instead; this interface only remains for backward compatibility and will
* be removed in a future version.
*/
public interface IPIntelligenceDataHash extends IPIntelligenceData {

/**
* Get the values for the specified property as a List&lt;&gt;.
* @param propertyName name of the property to get values for
* @param parametrizedTypes types parametrizing {@link AspectPropertyValue} starting with {@link List}
* @return values as a list
*/
AspectPropertyValue<List<?>> getValues(
String propertyName,
Class<?>[] parametrizedTypes);
}
@Deprecated
public interface IPIntelligenceDataHash extends IPIntelligenceDataOnPremise {
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,26 @@
* such notice(s) shall fulfill the requirements of that article.
* ********************************************************************* */

package fiftyone.ipintelligence;
package fiftyone.ipintelligence.engine.onpremise.data;

import fiftyone.ipintelligence.shared.IPIntelligenceData;
import fiftyone.pipeline.engines.data.AspectPropertyValue;

import java.util.List;

/**
* @deprecated no longer needed since IP Intelligence uses a different algorithm than device detection
* On-premise specific interface for {@link IPIntelligenceData}.
* @see <a href="https://github.com/51Degrees/specifications/blob/main/ip-intelligence-specification/pipeline-elements/ip-intelligence-on-premise.md#element-data">Specification</a>
*/
@Deprecated
public class Enums {
public enum IPIntelligenceAlgorithm {
Hash,
Pattern
}
public interface IPIntelligenceDataOnPremise extends IPIntelligenceData {

/**
* Get the values for the specified property as a List&lt;&gt;.
* @param propertyName name of the property to get values for
* @param parametrizedTypes types parametrizing {@link AspectPropertyValue} starting with {@link List}
* @return values as a list
*/
AspectPropertyValue<List<?>> getValues(
String propertyName,
Class<?>[] parametrizedTypes);
}
Loading