Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d6cb177
fix: arrow failed test case
aicam Jul 29, 2025
0e581e7
fix: downgrading arrow lib in R
aicam Jul 29, 2025
c0102f4
fix: downgrading arrow lib in R
aicam Jul 29, 2025
12cdf7d
fix: downgrading arrow lib in R
aicam Jul 29, 2025
4d6af65
fix: downgrading arrow lib in R
aicam Jul 29, 2025
fd6c9ad
fix: downgrading arrow lib in R
aicam Jul 29, 2025
82be22a
fix: downgrading arrow lib in R
aicam Jul 29, 2025
10c05f6
fix: downgrading arrow lib in R
aicam Jul 29, 2025
c97227b
fix: downgrading arrow lib in R
aicam Jul 29, 2025
27d4afb
fix: downgrading arrow lib in R
aicam Jul 29, 2025
e76a6e7
fix: downgrading arrow lib in R
aicam Jul 29, 2025
aec7aee
fix: downgrading arrow lib in R
aicam Jul 29, 2025
c65a1db
fix: downgrading arrow lib in R
aicam Jul 29, 2025
377863f
fix: downgrading arrow lib in R
aicam Jul 29, 2025
5cb1037
fix: downgrading arrow lib in R
aicam Jul 29, 2025
9da3556
fix: downgrading arrow lib in R
aicam Jul 30, 2025
65b065c
fix: downgrading arrow lib in R
aicam Jul 30, 2025
38d9bf7
Merge branch 'Texera:master' into master
aicam Aug 5, 2025
ed19464
Merge branch 'apache:master' into master
aicam Aug 8, 2025
2043ec9
Merge branch 'apache:master' into master
aicam Aug 11, 2025
51fac50
Merge branch 'apache:master' into master
aicam Aug 11, 2025
946c6ff
Merge branch 'apache:master' into master
aicam Aug 14, 2025
98120f9
Merge branch 'apache:master' into master
aicam Aug 18, 2025
1b1cd29
Merge branch 'apache:master' into master
aicam Aug 18, 2025
ca9a4be
Merge branch 'apache:main' into master
aicam Aug 20, 2025
879659b
Merge branch 'apache:main' into main
aicam Aug 27, 2025
feb2c4d
Merge branch 'apache:main' into main
aicam Aug 29, 2025
7d67268
Merge branch 'apache:main' into main
aicam Sep 3, 2025
009e88d
Merge branch 'apache:main' into main
aicam Sep 8, 2025
6806ded
Merge branch 'apache:main' into main
aicam Sep 10, 2025
3594355
Merge branch 'apache:main' into main
aicam Sep 18, 2025
57e1ce1
feat: Access Control Service
aicam Sep 25, 2025
0413c54
Merge branch 'main' into access-control-base
aicam Sep 25, 2025
6c2f63a
fix: comments
aicam Sep 25, 2025
7ace761
Merge remote-tracking branch 'origin/access-control-base' into access…
aicam Sep 25, 2025
3a12142
fix: comments
aicam Sep 25, 2025
febc2e6
fix: comments
aicam Sep 25, 2025
b3a4a8e
fix: lint
aicam Sep 26, 2025
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
81 changes: 81 additions & 0 deletions core/access-control-service/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

import scala.collection.Seq

name := "access-control-service"
organization := "edu.uci.ics"
version := "1.0.0"

scalaVersion := "2.13.12"

enablePlugins(JavaAppPackaging)

// Enable semanticdb for Scalafix
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision

// Manage dependency conflicts by always using the latest revision
ThisBuild / conflictManager := ConflictManager.latestRevision

// Restrict parallel execution of tests to avoid conflicts
Global / concurrentRestrictions += Tags.limit(Tags.Test, 1)

/////////////////////////////////////////////////////////////////////////////
// Compiler Options
/////////////////////////////////////////////////////////////////////////////

// Scala compiler options
Compile / scalacOptions ++= Seq(
"-Xelide-below", "WARNING", // Turn on optimizations with "WARNING" as the threshold
"-feature", // Check feature warnings
"-deprecation", // Check deprecation warnings
"-Ywarn-unused:imports" // Check for unused imports
)

/////////////////////////////////////////////////////////////////////////////
// Version Variables
/////////////////////////////////////////////////////////////////////////////

val dropwizardVersion = "4.0.7"
val mockitoVersion = "5.4.0"
val assertjVersion = "3.24.2"

/////////////////////////////////////////////////////////////////////////////
// Test-related Dependencies
/////////////////////////////////////////////////////////////////////////////

libraryDependencies ++= Seq(
"org.scalamock" %% "scalamock" % "5.2.0" % Test, // ScalaMock
"org.scalatest" %% "scalatest" % "3.2.17" % Test, // ScalaTest
"io.dropwizard" % "dropwizard-testing" % dropwizardVersion % Test, // Dropwizard Testing
"org.mockito" % "mockito-core" % mockitoVersion % Test, // Mockito for mocking
"org.assertj" % "assertj-core" % assertjVersion % Test, // AssertJ for assertions
"com.novocode" % "junit-interface" % "0.11" % Test // SBT interface for JUnit
)

/////////////////////////////////////////////////////////////////////////////
// Dependencies
/////////////////////////////////////////////////////////////////////////////

// Core Dependencies
libraryDependencies ++= Seq(
"io.dropwizard" % "dropwizard-core" % dropwizardVersion,
"io.dropwizard" % "dropwizard-auth" % dropwizardVersion, // Dropwizard Authentication module
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.15.2",
"org.playframework" %% "play-json" % "3.1.0-M1",
)
18 changes: 18 additions & 0 deletions core/access-control-service/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

sbt.version = 1.9.9
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

server:
applicationConnectors:
- type: http
port: 9096
adminConnectors: []

logging:
level: INFO
appenders:
- type: console
threshold: INFO
- type: file
currentLogFilename: logs/access-control-service.log
archive: true
archivedLogFilenamePattern: logs/access-control-service-%d.log.gz
archivedFileCount: 5
55 changes: 55 additions & 0 deletions core/access-control-service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder
by default -->
<encoder>
<pattern>[%date{ISO8601}] [%level] [%logger] [%thread] - %msg %n
</pattern>
</encoder>
</appender>


<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>../log/access-control-service.log</file>
<immediateFlush>true</immediateFlush>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>../log/access-control-service-%d{yyyy-MM-dd}.log.gz</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>[%date{ISO8601}] [%level] [%logger] [%thread] - %msg %n</pattern>
</encoder>
</appender>

<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<queueSize>8192</queueSize>
<neverBlock>true</neverBlock>
<appender-ref ref="FILE"/>
</appender>

<root level="INFO">
<appender-ref ref="ASYNC"/>
<appender-ref ref="STDOUT"/>
</root>
<logger name="org.apache" level="WARN"/>
<logger name="httpclient" level="WARN"/>
<logger name="io.grpc.netty" level="WARN"/>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package edu.uci.ics.texera.service

import io.dropwizard.core.Application
import io.dropwizard.core.setup.{Bootstrap, Environment}
import com.fasterxml.jackson.module.scala.DefaultScalaModule
import com.typesafe.scalalogging.LazyLogging
import edu.uci.ics.amber.config.StorageConfig
import edu.uci.ics.amber.util.PathUtils.{configServicePath, accessControlServicePath}
import edu.uci.ics.texera.auth.{JwtAuthFilter, SessionUser}
import edu.uci.ics.texera.dao.SqlServer
import edu.uci.ics.texera.service.resource.{HealthCheckResource, AccessControlResource}
import io.dropwizard.auth.AuthDynamicFeature
import org.eclipse.jetty.server.session.SessionHandler
import org.jooq.impl.DSL


class AccessControlService extends Application[AccessControlServiceConfiguration] with LazyLogging {
override def initialize(bootstrap: Bootstrap[AccessControlServiceConfiguration]): Unit = {
// Register Scala module to Dropwizard default object mapper
bootstrap.getObjectMapper.registerModule(DefaultScalaModule)

SqlServer.initConnection(
StorageConfig.jdbcUrl,
StorageConfig.jdbcUsername,
StorageConfig.jdbcPassword
)
}

override def run(configuration: AccessControlServiceConfiguration, environment: Environment): Unit = {
// Serve backend at /api
environment.jersey.setUrlPattern("/api/*")

environment.jersey.register(classOf[SessionHandler])
environment.servlets.setSessionHandler(new SessionHandler)

environment.jersey.register(classOf[HealthCheckResource])
environment.jersey.register(classOf[AccessControlResource])

// Register JWT authentication filter
environment.jersey.register(new AuthDynamicFeature(classOf[JwtAuthFilter]))

// Enable @Auth annotation for injecting SessionUser
environment.jersey.register(
new io.dropwizard.auth.AuthValueFactoryProvider.Binder(classOf[SessionUser])
)
}
}
object AccessControlService {
def main(args: Array[String]): Unit = {
val accessControlPath = accessControlServicePath
.resolve("src")
.resolve("main")
.resolve("resources")
.resolve("access-control-service-web-config.yaml")
.toAbsolutePath
.toString

// Start the Dropwizard application
new AccessControlService().run("server", accessControlPath)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package edu.uci.ics.texera.service

import io.dropwizard.core.Configuration

class AccessControlServiceConfiguration extends Configuration {}
Loading
Loading