Skip to content
Merged
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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,14 @@ mvn clean install
# skip tests
mvn clean install -DskipTests
```

## License

Licensed under Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)

### Contribution

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be licensed as above, without any additional terms or
conditions.
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<!--
~ Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
~ SPDX-License-Identifier: Apache-2.0
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.biscuitsec</groupId>
<groupId>org.eclipse</groupId>
<artifactId>biscuit</artifactId>
<packaging>jar</packaging>
<version>4.0.1</version>
<name>biscuit-java</name>
<url>https://github.com/biscuit-auth/biscuit-java</url>
<url>https://github.com/eclipse-biscuit/biscuit-java</url>

<description>Java support for the biscuit auth token and policy language</description>

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/biscuitsec/biscuit/crypto/package-info.java

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/java/org/biscuitsec/biscuit/error/package-info.java

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/java/org/biscuitsec/biscuit/token/package-info.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.crypto;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.Optional;
import org.biscuitsec.biscuit.token.format.ExternalSignature;
import org.eclipse.biscuit.token.format.ExternalSignature;

public final class BlockSignatureBuffer {
public static final int HEADER_SIZE = 4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.crypto;

import java.security.SecureRandom;
import org.biscuitsec.biscuit.token.builder.Utils;
import org.eclipse.biscuit.token.builder.Utils;
import org.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.bouncycastle.crypto.generators.Ed25519KeyPairGenerator;
import org.bouncycastle.crypto.params.Ed25519KeyGenerationParameters;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.crypto;

import biscuit.format.schema.Schema.PublicKey.Algorithm;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.crypto;

import io.vavr.control.Option;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.crypto;

import biscuit.format.schema.Schema.PublicKey.Algorithm;
import java.security.SecureRandom;
import org.biscuitsec.biscuit.token.builder.Utils;
import org.eclipse.biscuit.token.builder.Utils;

/** Private and public key. */
public abstract class KeyPair implements Signer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.crypto;

import biscuit.format.schema.Schema;
import biscuit.format.schema.Schema.PublicKey.Algorithm;
Expand All @@ -8,8 +13,8 @@
import java.security.SignatureException;
import java.util.Optional;
import java.util.Set;
import org.biscuitsec.biscuit.error.Error;
import org.biscuitsec.biscuit.token.builder.Utils;
import org.eclipse.biscuit.error.Error;
import org.eclipse.biscuit.token.builder.Utils;

public abstract class PublicKey {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.crypto;

import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.Security;
import java.security.Signature;
import java.security.SignatureException;
import org.biscuitsec.biscuit.token.builder.Utils;
import org.eclipse.biscuit.token.builder.Utils;
import org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey;
import org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey;
import org.bouncycastle.jce.ECNamedCurveTable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

import static org.biscuitsec.biscuit.crypto.SECP256R1KeyPair.CURVE;
import static org.biscuitsec.biscuit.crypto.SECP256R1KeyPair.getSignature;
package org.eclipse.biscuit.crypto;

import static org.eclipse.biscuit.crypto.SECP256R1KeyPair.CURVE;
import static org.eclipse.biscuit.crypto.SECP256R1KeyPair.getSignature;

import biscuit.format.schema.Schema.PublicKey.Algorithm;
import java.security.InvalidKeyException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.crypto;

import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.crypto;

import static io.vavr.API.Left;
import static io.vavr.API.Right;
Expand All @@ -8,7 +13,7 @@
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.ArrayList;
import org.biscuitsec.biscuit.error.Error;
import org.eclipse.biscuit.error.Error;

class Token {
private final ArrayList<byte[]> blocks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package org.biscuitsec.biscuit.crypto;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

import org.biscuitsec.biscuit.token.builder.Utils;
package org.eclipse.biscuit.crypto;

import org.eclipse.biscuit.token.builder.Utils;

/** Signature aggregation */
public final class TokenSignature {
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/eclipse/biscuit/crypto/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

/** Cryptographic operations for Biscuit tokens */
package org.eclipse.biscuit.crypto;
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import static biscuit.format.schema.Schema.CheckV2.Kind.All;
import static io.vavr.API.Left;
Expand All @@ -9,7 +14,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import org.biscuitsec.biscuit.error.Error;
import org.eclipse.biscuit.error.Error;

public final class Check {
public enum Kind {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import io.vavr.Tuple2;
import io.vavr.control.Option;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import static io.vavr.API.Left;
import static io.vavr.API.Right;
Expand All @@ -8,7 +13,7 @@
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
import org.biscuitsec.biscuit.error.Error;
import org.eclipse.biscuit.error.Error;

public final class Fact implements Serializable {
private final Predicate predicate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import io.vavr.Tuple2;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import io.vavr.control.Option;
import java.io.Serializable;
Expand All @@ -7,8 +12,8 @@
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import org.biscuitsec.biscuit.datalog.expressions.Expression;
import org.biscuitsec.biscuit.error.Error;
import org.eclipse.biscuit.datalog.expressions.Expression;
import org.eclipse.biscuit.error.Error;

public final class MatchedVariables implements Serializable {
private final Map<Long, Optional<Term>> variables;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import java.util.Collection;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import static io.vavr.API.Left;
import static io.vavr.API.Right;
Expand All @@ -11,7 +16,7 @@
import java.util.ListIterator;
import java.util.Objects;
import java.util.stream.Collectors;
import org.biscuitsec.biscuit.error.Error;
import org.eclipse.biscuit.error.Error;

public final class Predicate implements Serializable {
private final long name;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import static io.vavr.API.Left;
import static io.vavr.API.Right;
Expand All @@ -21,8 +26,8 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import org.biscuitsec.biscuit.datalog.expressions.Expression;
import org.biscuitsec.biscuit.error.Error;
import org.eclipse.biscuit.datalog.expressions.Expression;
import org.eclipse.biscuit.error.Error;

public final class Rule implements Serializable {
private final Predicate head;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import io.vavr.Tuple2;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package org.biscuitsec.biscuit.datalog;
/*
* Copyright (c) 2019 Geoffroy Couprie <[email protected]> and Contributors to the Eclipse Foundation.
* SPDX-License-Identifier: Apache-2.0
*/

package org.eclipse.biscuit.datalog;

import java.time.Duration;

Expand Down
Loading